@@ -67,63 +67,61 @@ apply from: "../../node_modules/react-native/react.gradle"
67
67
* - An APK that only works on x86 devices
68
68
* The advantage is the size of the APK is reduced by about 4MB.
69
69
* Upload all the APKs to the Play Store and people will download
70
- * the correct one based on the CPU architecture of their device.
71
- */
70
+ * the correct one based on the CPU architecture of their device.*/
72
71
def enableSeparateBuildPerCPUArchitecture = false
73
72
74
73
/**
75
- * Run Proguard to shrink the Java bytecode in release builds.
76
- */
74
+ * Run Proguard to shrink the Java bytecode in release builds.*/
77
75
def enableProguardInReleaseBuilds = false
78
76
79
77
android {
80
- compileSdkVersion 25
81
- buildToolsVersion " 25.0.1 "
78
+ compileSdkVersion rootProject . compileSdkVersion
79
+ buildToolsVersion rootProject . buildToolsVersion
82
80
83
- defaultConfig {
84
- applicationId " com.github.droibit.android.reactnative.customtabs.example"
85
- minSdkVersion 16
86
- targetSdkVersion 23
87
- versionCode 1
88
- versionName " 1.0"
89
- ndk {
90
- abiFilters " armeabi-v7a" , " x86"
91
- }
81
+ defaultConfig {
82
+ applicationId " com.github.droibit.android.reactnative.customtabs.example"
83
+ minSdkVersion 16
84
+ targetSdkVersion rootProject. targetSdkVersion
85
+ versionCode 1
86
+ versionName " 1.0"
87
+ ndk {
88
+ abiFilters " armeabi-v7a" , " x86"
92
89
}
93
- splits {
94
- abi {
95
- reset()
96
- enable enableSeparateBuildPerCPUArchitecture
97
- universalApk false // If true, also generate a universal APK
98
- include " armeabi-v7a " , " x86 "
99
- }
90
+ }
91
+ splits {
92
+ abi {
93
+ reset()
94
+ enable enableSeparateBuildPerCPUArchitecture
95
+ universalApk false // If true, also generate a universal APK
96
+ include " armeabi-v7a " , " x86 "
100
97
}
101
- buildTypes {
102
- release {
103
- minifyEnabled enableProguardInReleaseBuilds
104
- proguardFiles getDefaultProguardFile( " proguard-android.txt " ), " proguard-rules.pro "
105
- }
98
+ }
99
+ buildTypes {
100
+ release {
101
+ minifyEnabled enableProguardInReleaseBuilds
102
+ proguardFiles getDefaultProguardFile( " proguard-android.txt " ), " proguard-rules.pro "
106
103
}
107
- // applicationVariants are e.g. debug, release
108
- applicationVariants. all { variant ->
109
- variant . outputs . each { output ->
110
- // For each separate APK per architecture, set a unique version code as described here:
111
- // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
112
- def versionCodes = [ " armeabi-v7a " : 1 , " x86 " : 2 ]
113
- def abi = output . getFilter( OutputFile . ABI )
114
- if ( abi != null ) { // null for the universal-debug, universal-release variants
115
- output . versionCodeOverride =
116
- versionCodes . get(abi) * 1048576 + defaultConfig . versionCode
117
- }
118
- }
104
+ }
105
+ // applicationVariants are e.g. debug, release
106
+ applicationVariants . all { variant ->
107
+ variant . outputs . each { output ->
108
+ // For each separate APK per architecture, set a unique version code as described here:
109
+ // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
110
+ def versionCodes = [ " armeabi-v7a " : 1 , " x86 " : 2 ]
111
+ def abi = output . getFilter( OutputFile . ABI )
112
+ if (abi != null ) {
113
+ // null for the universal-debug, universal-release variants
114
+ output . versionCodeOverride = versionCodes . get(abi) * 1048576 + defaultConfig . versionCode
115
+ }
119
116
}
117
+ }
120
118
}
121
119
122
120
dependencies {
123
- compile fileTree(dir : " libs" , include : [" *.jar" ])
124
- compile project(' :react-native-custom-tabs' )
125
- compile " com.android.support:appcompat-v7:25.0.1 "
126
- compile " com.facebook.react:react-native:+" // From node_modules
121
+ compile fileTree(dir : " libs" , include : [" *.jar" ])
122
+ compile project(' :react-native-custom-tabs' )
123
+ compile " com.android.support:appcompat-v7:${ rootProject.supportLibVersion } "
124
+ compile " com.facebook.react:react-native:+" // From node_modules
127
125
}
128
126
129
127
// Run this once to be able to run the application with BUCK
0 commit comments