@@ -3,8 +3,6 @@ apply plugin: "com.facebook.react"
3
3
apply from : project(' :react-native-config' ). projectDir. getPath() + " /dotenv.gradle"
4
4
apply plugin : ' com.huawei.agconnect' // huawei push
5
5
6
- import com.android.build.OutputFile
7
-
8
6
/**
9
7
* This is the configuration block to customize your React Native Android app.
10
8
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -15,8 +13,8 @@ react {
15
13
// root = file("../")
16
14
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
17
15
// reactNativeDir = file("../node_modules/react-native")
18
- // The folder where the react-native Codegen package is. Default is ../node_modules/react-native- codegen
19
- // codegenDir = file("../node_modules/react-native- codegen")
16
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@ react-native/ codegen
17
+ // codegenDir = file("../node_modules/@ react-native/ codegen")
20
18
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
21
19
// cliFile = file("../node_modules/react-native/cli.js")
22
20
@@ -54,14 +52,6 @@ react {
54
52
// hermesFlags = ["-O", "-output-source-map"]
55
53
}
56
54
57
- /**
58
- * Set this to true to create four separate APKs instead of one,
59
- * one for each native architecture. This is useful if you don't
60
- * use App Bundles (https://developer.android.com/guide/app-bundle/)
61
- * and want to have separate APKs to upload to the Play Store.
62
- */
63
- def enableSeparateBuildPerCPUArchitecture = false
64
-
65
55
/**
66
56
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
67
57
*/
@@ -80,16 +70,6 @@ def enableProguardInReleaseBuilds = false
80
70
*/
81
71
def jscFlavor = ' org.webkit:android-jsc:+'
82
72
83
- /**
84
- * Private function to get the list of Native Architectures you want to build.
85
- * This reads the value from reactNativeArchitectures in your gradle.properties
86
- * file and works together with the --active-arch-only flag of react-native run-android.
87
- */
88
- def reactNativeArchitectures () {
89
- def value = project. getProperties(). get(" reactNativeArchitectures" )
90
- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
91
- }
92
-
93
73
android {
94
74
ndkVersion rootProject. ext. ndkVersion
95
75
@@ -122,14 +102,6 @@ android {
122
102
]
123
103
}
124
104
125
- splits {
126
- abi {
127
- reset()
128
- enable enableSeparateBuildPerCPUArchitecture
129
- universalApk false // If true, also generate a universal APK
130
- include (* reactNativeArchitectures())
131
- }
132
- }
133
105
signingConfigs {
134
106
debug {
135
107
if (project. env. get(' TAILCHAT_UPLOAD_STORE_FILE' )) {
@@ -162,30 +134,12 @@ android {
162
134
// https://stackoverflow.com/questions/49286268/error-execution-failed-for-task-app-lintvitalrelease-any-one-can-solve-it
163
135
checkReleaseBuilds false
164
136
}
165
-
166
- // applicationVariants are e.g. debug, release
167
- applicationVariants. all { variant ->
168
- variant. outputs. each { output ->
169
- // For each separate APK per architecture, set a unique version code as described here:
170
- // https://developer.android.com/studio/build/configure-apk-splits.html
171
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
172
- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
173
- def abi = output. getFilter(OutputFile . ABI )
174
- if (abi != null ) { // null for the universal-debug, universal-release variants
175
- output. versionCodeOverride =
176
- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
177
- }
178
-
179
- }
180
- }
181
137
}
182
138
183
139
dependencies {
184
140
// The version of react-native is set by the React Native Gradle Plugin
185
141
implementation(" com.facebook.react:react-android" )
186
142
187
- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" )
188
-
189
143
debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
190
144
debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
191
145
exclude group :' com.squareup.okhttp3' , module :' okhttp'
0 commit comments