|
@@ -1,3 +1,5 @@
|
|
1
|
+import groovy.json.JsonSlurper
|
|
2
|
+
|
1
|
3
|
// Top-level build file where you can add configuration options common to all
|
2
|
4
|
// sub-projects/modules.
|
3
|
5
|
|
|
@@ -34,13 +36,13 @@ allprojects {
|
34
|
36
|
if (details.requested.group == 'com.facebook.react'
|
35
|
37
|
&& details.requested.name == 'react-native') {
|
36
|
38
|
def file = new File("$rootDir/../node_modules/react-native/package.json")
|
37
|
|
- def version = new groovy.json.JsonSlurper().parseText(file.text).version
|
|
39
|
+ def version = new JsonSlurper().parseText(file.text).version
|
38
|
40
|
details.useVersion version
|
39
|
41
|
}
|
40
|
42
|
if (details.requested.group == 'org.webkit'
|
41
|
43
|
&& details.requested.name == 'android-jsc') {
|
42
|
44
|
def file = new File("$rootDir/../node_modules/jsc-android/package.json")
|
43
|
|
- def version = new groovy.json.JsonSlurper().parseText(file.text).version
|
|
45
|
+ def version = new JsonSlurper().parseText(file.text).version
|
44
|
46
|
details.useVersion "r${version.tokenize('.')[0]}"
|
45
|
47
|
}
|
46
|
48
|
}
|
|
@@ -65,7 +67,7 @@ allprojects {
|
65
|
67
|
afterEvaluate { project ->
|
66
|
68
|
if (project.name.startsWith('react-native-')) {
|
67
|
69
|
def npmManifest = project.file('../package.json')
|
68
|
|
- def json = new groovy.json.JsonSlurper().parseText(npmManifest.text)
|
|
70
|
+ def json = new JsonSlurper().parseText(npmManifest.text)
|
69
|
71
|
|
70
|
72
|
// React Native modules have an npm peer dependency on react-native,
|
71
|
73
|
// they do not have an npm dependency on it. Further below though we
|