@@ -9,7 +9,7 @@ import com.android.build.OutputFile
99 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
1010 * bundle directly from the development server. Below you can see all the possible configurations
1111 * 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.
1313 *
1414 * project.ext.react = [
1515 * // the name of the generated asset file containing your JS bundle
@@ -26,7 +26,9 @@ import com.android.build.OutputFile
2626 *
2727 * // whether to bundle JS and assets in another build variant (if configured).
2828 * // 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}'
3032 * // bundleInFreeDebug: true,
3133 * // bundleInPaidRelease: true,
3234 * // bundleInBeta: true,
@@ -57,11 +59,10 @@ import com.android.build.OutputFile
5759 * ]
5860 */
5961
60- apply from : " react.gradle"
62+ apply from : " ../../node_modules/react-native/ react.gradle"
6163
6264/**
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:
6566 * - An APK that only works on ARM devices
6667 * - An APK that only works on x86 devices
6768 * The advantage is the size of the APK is reduced by about 4MB.
@@ -91,9 +92,9 @@ android {
9192 }
9293 splits {
9394 abi {
94- enable enableSeparateBuildPerCPUArchitecture
95- universalApk false
9695 reset()
96+ enable enableSeparateBuildPerCPUArchitecture
97+ universalApk false // If true, also generate a universal APK
9798 include " armeabi-v7a" , " x86"
9899 }
99100 }
@@ -119,9 +120,15 @@ android {
119120}
120121
121122dependencies {
123+ compile project(' :react-native-svg' )
122124 compile fileTree(dir : " libs" , include : [" *.jar" ])
123125 compile " com.android.support:appcompat-v7:23.0.1"
124- compile " com.facebook.react:react-native:0.20.+"
126+ compile " com.facebook.react:react-native:+" // From node_modules
127+ }
125128
126- compile project(' :react-native-svg' )
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'
127134}
0 commit comments