浏览代码

Merge branch '0.7.4'

Ben Hsieh 8 年前
父节点
当前提交
c1b8e07332
共有 6 个文件被更改,包括 11 次插入3 次删除
  1. 1
    0
      README.md
  2. 1
    1
      package.json
  3. 1
    0
      src/README.md
  4. 1
    1
      src/android/build.gradle
  5. 1
    1
      src/package.json
  6. 6
    0
      src/scripts/prelink.js

+ 1
- 0
README.md 查看文件

@@ -614,6 +614,7 @@ RNFetchBlob.config({
614 614
 
615 615
 | Version | |
616 616
 |---|---|
617
+| 0.7.4 | Fix app crash problem in version > 0.27 |
617 618
 | 0.7.3 | Fix OkHttp dependency issue in version < 0.29 |
618 619
 | 0.7.2 | Fix cancel request bug |
619 620
 | 0.7.1 | Fix #57 ios module could not compile on ios version <= 9.3 |

+ 1
- 1
package.json 查看文件

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "fetchblob",
3
-  "version": "0.7.3",
3
+  "version": "0.7.4",
4 4
   "private": true,
5 5
   "scripts": {
6 6
     "start": "node node_modules/react-native/local-cli/cli.js start",

+ 1
- 0
src/README.md 查看文件

@@ -618,6 +618,7 @@ RNFetchBlob.config({
618 618
 
619 619
 | Version | |
620 620
 |---|---|
621
+| 0.7.4 | Fix app crash problem in version > 0.27 |
621 622
 | 0.7.3 | Fix OkHttp dependency issue in version < 0.29 |
622 623
 | 0.7.2 | Fix cancel request bug |
623 624
 | 0.7.1 | Fix #57 ios module could not compile on ios version <= 9.3 |

+ 1
- 1
src/android/build.gradle 查看文件

@@ -34,5 +34,5 @@ android {
34 34
 
35 35
 dependencies {
36 36
     compile 'com.facebook.react:react-native:+'
37
-    compile 'com.squareup.okhttp3:okhttp:3.4.1'
37
+    //{RNFetchBlob_PRE_0.29_DEPDENDENCY}
38 38
 }

+ 1
- 1
src/package.json 查看文件

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-fetch-blob",
3
-  "version": "0.7.3",
3
+  "version": "0.7.4",
4 4
   "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5 5
   "main": "index.js",
6 6
   "scripts": {

+ 6
- 0
src/scripts/prelink.js 查看文件

@@ -12,6 +12,7 @@ if (!hasNecessaryFile) {
12 12
 var package = JSON.parse(fs.readFileSync(PACKAGE_JSON));
13 13
 var APP_NAME = package.name;
14 14
 var APPLICATION_MAIN = process.cwd() + '/android/app/src/main/java/com/' + APP_NAME.toLocaleLowerCase() + '/MainApplication.java';
15
+var PACKAGE_GRADLE = process.cwd() + '/node_modules/react-native-fetch-blob/android/build.gradle'
15 16
 
16 17
 var VERSION = checkVersion();
17 18
 console.log('RNFetchBlob detected app version .. ' + VERSION);
@@ -28,11 +29,16 @@ if(VERSION >= 0.29) {
28 29
   }
29 30
   main = String(main).replace('new MainReactPackage()', 'new RNFetchBlobPackage(),\n           new MainReactPackage()');
30 31
   main = String(main).replace('import com.facebook.react.ReactApplication;', 'import com.facebook.react.ReactApplication;\nimport com.RNFetchBlob.RNFetchBlobPackage;')
32
+
31 33
   fs.writeFileSync(APPLICATION_MAIN, main);
32 34
   console.log('RNFetchBlob patching MainApplication.java .. ok')
33 35
 
34 36
 }
35 37
 
38
+if(VERSION < 0.27) {
39
+  console.log('You project version is '+ VERSION + 'which does not meet requirement of react-native-fetch-blob 7.0+, please upgrade your application template to react-native 0.27+, otherwise Android application will not working.')
40
+}
41
+
36 42
 // set file access permission for Android < 6.0
37 43
 fs.readFile(MANIFEST_PATH, function(err, data) {
38 44