1
1
apply plugin : " com.android.application"
2
2
apply plugin : " com.facebook.react"
3
3
4
- import com.android.build.OutputFile
5
4
import org.apache.tools.ant.taskdefs.condition.Os
6
5
7
6
/**
@@ -15,7 +14,7 @@ react {
15
14
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
16
15
// reactNativeDir = file("../node_modules/react-native")
17
16
// 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")
19
18
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
20
19
// cliFile = file("../node_modules/react-native/cli.js")
21
20
@@ -53,16 +52,6 @@ react {
53
52
// hermesFlags = ["-O", "-output-source-map"]
54
53
}
55
54
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
-
66
55
/**
67
56
* Run Proguard to shrink the Java bytecode in release builds.
68
57
*/
@@ -81,31 +70,15 @@ def enableProguardInReleaseBuilds = false
81
70
*/
82
71
def jscFlavor = ' org.webkit:android-jsc:+'
83
72
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
-
92
73
android {
93
74
compileSdkVersion rootProject. ext. compileSdkVersion
94
75
95
76
defaultConfig {
96
77
applicationId " dev.gorhom.bottomsheet"
97
78
minSdkVersion rootProject. ext. minSdkVersion
98
79
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"
109
82
}
110
83
signingConfigs {
111
84
debug {
@@ -127,28 +100,13 @@ android {
127
100
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
128
101
}
129
102
}
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
- }
144
103
}
145
104
146
105
dependencies {
147
106
// The version of react-native is set by the React Native Gradle Plugin
148
107
implementation(" com.facebook.react:react-android" )
149
108
150
109
// noinspection GradleDynamicVersion
151
- implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
152
110
implementation ' androidx.work:work-runtime-ktx:2.7.1'
153
111
154
112
debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
0 commit comments