11apply plugin : " com.android.application"
22apply plugin : " com.facebook.react"
33
4- import com.android.build.OutputFile
54import org.apache.tools.ant.taskdefs.condition.Os
65
76/**
@@ -15,7 +14,7 @@ react {
1514 // The folder where the react-native NPM package is. Default is ../node_modules/react-native
1615 // reactNativeDir = file("../node_modules/react-native")
1716 // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
18- // codegenDir = file("../node_modules/react-native- codegen")
17+ // codegenDir = file("../node_modules/@ react-native/ codegen")
1918 // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
2019 // cliFile = file("../node_modules/react-native/cli.js")
2120
@@ -53,16 +52,6 @@ react {
5352 // hermesFlags = ["-O", "-output-source-map"]
5453}
5554
56- /**
57- * Set this to true to create two separate APKs instead of one:
58- * - An APK that only works on ARM devices
59- * - An APK that only works on x86 devices
60- * The advantage is the size of the APK is reduced by about 4MB.
61- * Upload all the APKs to the Play Store and people will download
62- * the correct one based on the CPU architecture of their device.
63- */
64- def enableSeparateBuildPerCPUArchitecture = false
65-
6655/**
6756 * Run Proguard to shrink the Java bytecode in release builds.
6857 */
@@ -81,31 +70,15 @@ def enableProguardInReleaseBuilds = false
8170 */
8271def jscFlavor = ' org.webkit:android-jsc:+'
8372
84- /**
85- * Architectures to build native code for in debug.
86- */
87- def reactNativeArchitectures () {
88- def value = project. getProperties(). get(" reactNativeArchitectures" )
89- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
90- }
91-
9273android {
9374 compileSdkVersion rootProject. ext. compileSdkVersion
9475
9576 defaultConfig {
9677 applicationId " dev.gorhom.bottomsheet"
9778 minSdkVersion rootProject. ext. minSdkVersion
9879 targetSdkVersion rootProject. ext. targetSdkVersion
99- versionCode 1
100- versionName " 1.0"
101- }
102- splits {
103- abi {
104- reset()
105- enable enableSeparateBuildPerCPUArchitecture
106- universalApk false // If true, also generate a universal APK
107- include (* reactNativeArchitectures())
108- }
80+ versionCode 5
81+ versionName " 5.0"
10982 }
11083 signingConfigs {
11184 debug {
@@ -127,28 +100,13 @@ android {
127100 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
128101 }
129102 }
130- // applicationVariants are e.g. debug, release
131- applicationVariants. all { variant ->
132- variant. outputs. each { output ->
133- // For each separate APK per architecture, set a unique version code as described here:
134- // https://developer.android.com/studio/build/configure-apk-splits.html
135- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
136- def abi = output. getFilter(OutputFile . ABI )
137- if (abi != null ) { // null for the universal-debug, universal-release variants
138- output. versionCodeOverride =
139- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
140- }
141-
142- }
143- }
144103}
145104
146105dependencies {
147106 // The version of react-native is set by the React Native Gradle Plugin
148107 implementation(" com.facebook.react:react-android" )
149108
150109 // noinspection GradleDynamicVersion
151- implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
152110 implementation ' androidx.work:work-runtime-ktx:2.7.1'
153111
154112 debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
0 commit comments