@@ -9,7 +9,7 @@ import com.android.build.OutputFile
9
9
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
10
* bundle directly from the development server. Below you can see all the possible configurations
11
11
* and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "react.gradle"` line.
12
+ * `apply from: "../../node_modules/react-native/ react.gradle"` line.
13
13
*
14
14
* project.ext.react = [
15
15
* // the name of the generated asset file containing your JS bundle
@@ -26,7 +26,9 @@ import com.android.build.OutputFile
26
26
*
27
27
* // whether to bundle JS and assets in another build variant (if configured).
28
28
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29
- * // The configuration property is in the format 'bundleIn${productFlavor}${buildType}'
29
+ * // The configuration property can be in the following formats
30
+ * // 'bundleIn${productFlavor}${buildType}'
31
+ * // 'bundleIn${buildType}'
30
32
* // bundleInFreeDebug: true,
31
33
* // bundleInPaidRelease: true,
32
34
* // bundleInBeta: true,
@@ -57,11 +59,10 @@ import com.android.build.OutputFile
57
59
* ]
58
60
*/
59
61
60
- apply from : " react.gradle"
62
+ apply from : " ../../node_modules/react-native/ react.gradle"
61
63
62
64
/**
63
- * Set this to true to create three separate APKs instead of one:
64
- * - A universal APK that works on all devices
65
+ * Set this to true to create two separate APKs instead of one:
65
66
* - An APK that only works on ARM devices
66
67
* - An APK that only works on x86 devices
67
68
* The advantage is the size of the APK is reduced by about 4MB.
@@ -91,9 +92,9 @@ android {
91
92
}
92
93
splits {
93
94
abi {
94
- enable enableSeparateBuildPerCPUArchitecture
95
- universalApk false
96
95
reset()
96
+ enable enableSeparateBuildPerCPUArchitecture
97
+ universalApk false // If true, also generate a universal APK
97
98
include " armeabi-v7a" , " x86"
98
99
}
99
100
}
@@ -122,5 +123,12 @@ dependencies {
122
123
compile project(' :react-native-vector-icons' )
123
124
compile fileTree(dir : " libs" , include : [" *.jar" ])
124
125
compile " com.android.support:appcompat-v7:23.0.1"
125
- compile " com.facebook.react:react-native:0.20.+"
126
+ compile " com.facebook.react:react-native:+" // From node_modules
127
+ }
128
+
129
+ // Run this once to be able to run the application with BUCK
130
+ // puts all compile dependencies into folder libs for BUCK to use
131
+ task copyDownloadableDepsToLibs (type : Copy ) {
132
+ from configurations. compile
133
+ into ' libs'
126
134
}
0 commit comments