@@ -2,8 +2,6 @@ apply plugin: "com.android.application"
22apply plugin : " com.facebook.react"
33apply plugin : ' com.google.gms.google-services'
44
5- import com.android.build.OutputFile
6-
75/**
86 * This is the configuration block to customize your React Native Android app.
97 * By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -15,8 +13,8 @@ react {
1513 // root = file("../")
1614 // The folder where the react-native NPM package is. Default is ../node_modules/react-native
1715 // 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")
2018 // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
2119 // cliFile = file("../node_modules/react-native/cli.js")
2220 /* Variants */
@@ -51,14 +49,6 @@ react {
5149 // hermesFlags = ["-O", "-output-source-map"]
5250}
5351
54- /**
55- * Set this to true to create four separate APKs instead of one,
56- * one for each native architecture. This is useful if you don't
57- * use App Bundles (https://developer.android.com/guide/app-bundle/)
58- * and want to have separate APKs to upload to the Play Store.
59- */
60- def enableSeparateBuildPerCPUArchitecture = false
61-
6252/**
6353 * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
6454 */
@@ -77,16 +67,6 @@ def enableProguardInReleaseBuilds = false
7767 */
7868def jscFlavor = ' org.webkit:android-jsc:+'
7969
80- /**
81- * Private function to get the list of Native Architectures you want to build.
82- * This reads the value from reactNativeArchitectures in your gradle.properties
83- * file and works together with the --active-arch-only flag of react-native run-android.
84- */
85- def reactNativeArchitectures () {
86- def value = project. getProperties(). get(" reactNativeArchitectures" )
87- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
88- }
89-
9070android {
9171 ndkVersion rootProject. ext. ndkVersion
9272
@@ -105,14 +85,6 @@ android {
10585 versionCode 50
10686 versionName " 0.2"
10787 }
108- splits {
109- abi {
110- reset()
111- enable enableSeparateBuildPerCPUArchitecture
112- universalApk false // If true, also generate a universal APK
113- include (* reactNativeArchitectures())
114- }
115- }
11688 signingConfigs {
11789 debug {
11890 storeFile file(' debug.keystore' )
@@ -133,28 +105,9 @@ android {
133105 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
134106 }
135107 }
136-
137- // applicationVariants are e.g. debug, release
138- applicationVariants. all { variant ->
139- variant. outputs. each { output ->
140- // For each separate APK per architecture, set a unique version code as described here:
141- // https://developer.android.com/studio/build/configure-apk-splits.html
142- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
143- def abi = output. getFilter(OutputFile . ABI )
144- if (abi != null ) { // null for the universal-debug, universal-release variants
145- output. versionCodeOverride =
146- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
147- }
148-
149- }
150- }
151108}
152109
153110dependencies {
154- implementation (" androidx.lifecycle:lifecycle-runtime-ktx:2.3.0" ) {
155- force = true
156- }
157-
158111 def isGifEnabled = (findProperty(' expo.gif.enabled' ) ?: " " ) == " true" ;
159112 def isWebpEnabled = (findProperty(' expo.webp.enabled' ) ?: " " ) == " true" ;
160113 def isWebpAnimatedEnabled = (findProperty(' expo.webp.animated' ) ?: " " ) == " true" ;
@@ -182,7 +135,6 @@ dependencies {
182135
183136 // The version of react-native is set by the React Native Gradle Plugin
184137 implementation(" com.facebook.react:react-android" )
185- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" )
186138 debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
187139 debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
188140 exclude group :' com.squareup.okhttp3' , module :' okhttp'
0 commit comments