Selaa lähdekoodia

[Android] Update JSC version

The JSC version used by React Native is about 3 years old, and doesn't implement
things like Symbol or Typed Arrays, which require polyfills. These polyfills are
sometimes a los less performant, as is the case for Typed Arrays.

Bumping an updated JSC version makes both platforms consistent when it comes to
the JavaScript platform.
master
Saúl Ibarra Corretgé 6 vuotta sitten
vanhempi
commit
8d3cecad86
3 muutettua tiedostoa jossa 14 lisäystä ja 1 poistoa
  1. 8
    1
      android/build.gradle
  2. 5
    0
      package-lock.json
  3. 1
    0
      package.json

+ 8
- 1
android/build.gradle Näytä tiedosto

18
     repositories {
18
     repositories {
19
         google()
19
         google()
20
         jcenter()
20
         jcenter()
21
+        maven { url "$rootDir/../node_modules/jsc-android/dist" }
21
         // React Native (JS, Obj-C sources, Android binaries) is installed from
22
         // React Native (JS, Obj-C sources, Android binaries) is installed from
22
         // npm.
23
         // npm.
23
         maven { url "$rootDir/../node_modules/react-native/android" }
24
         maven { url "$rootDir/../node_modules/react-native/android" }
34
                     def version = new groovy.json.JsonSlurper().parseText(file.text).version
35
                     def version = new groovy.json.JsonSlurper().parseText(file.text).version
35
                     details.useVersion version
36
                     details.useVersion version
36
                 }
37
                 }
38
+                if (details.requested.group == 'org.webkit'
39
+                        && details.requested.name == 'android-jsc') {
40
+                    def file = new File("$rootDir/../node_modules/jsc-android/package.json")
41
+                    def version = new groovy.json.JsonSlurper().parseText(file.text).version
42
+                    details.useVersion "r${version.tokenize('.')[0]}"
43
+                }
37
             }
44
             }
38
         }
45
         }
39
     }
46
     }
146
 ext {
153
 ext {
147
     buildToolsVersion = "26.0.2"
154
     buildToolsVersion = "26.0.2"
148
     compileSdkVersion = 26
155
     compileSdkVersion = 26
149
-    minSdkVersion    = 16
156
+    minSdkVersion    = 21
150
     targetSdkVersion = 26
157
     targetSdkVersion = 26
151
 
158
 
152
     // The Maven artifact groupdId of the third-party react-native modules which
159
     // The Maven artifact groupdId of the third-party react-native modules which

+ 5
- 0
package-lock.json Näytä tiedosto

9519
       "dev": true,
9519
       "dev": true,
9520
       "optional": true
9520
       "optional": true
9521
     },
9521
     },
9522
+    "jsc-android": {
9523
+      "version": "224109.1.0",
9524
+      "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-224109.1.0.tgz",
9525
+      "integrity": "sha512-mhALFynePc/wJsUt9BJuH13mSK/dGWtBO/pcYwVV1I0A7iduyqy3fSoAt1b0yI+/B3TzlGyue/gqjPxsqG1HRQ=="
9526
+    },
9522
     "jsesc": {
9527
     "jsesc": {
9523
       "version": "1.3.0",
9528
       "version": "1.3.0",
9524
       "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
9529
       "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",

+ 1
- 0
package.json Näytä tiedosto

47
     "jquery-contextmenu": "2.4.5",
47
     "jquery-contextmenu": "2.4.5",
48
     "jquery-i18next": "1.2.0",
48
     "jquery-i18next": "1.2.0",
49
     "js-md5": "0.6.1",
49
     "js-md5": "0.6.1",
50
+    "jsc-android": "224109.1.0",
50
     "jwt-decode": "2.2.0",
51
     "jwt-decode": "2.2.0",
51
     "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#2be752fc88ff71e454c6b9178b21a33b59c53f41",
52
     "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#2be752fc88ff71e454c6b9178b21a33b59c53f41",
52
     "lodash": "4.17.4",
53
     "lodash": "4.17.4",

Loading…
Peruuta
Tallenna