@@ -15,10 +15,12 @@ import com.android.build.OutputFile
1515 * // the name of the generated asset file containing your JS bundle
1616 * bundleAssetName: "index.android.bundle",
1717 *
18- * // the entry file for bundle generation
18+ * // the entry file for bundle generation. If none specified and
19+ * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20+ * // default. Can be overridden with ENTRY_FILE environment variable.
1921 * entryFile: "index.android.js",
2022 *
21- * // https://facebook.github.io/react-native /docs/performance#enable-the-ram-format
23+ * // https://reactnative.dev /docs/performance#enable-the-ram-format
2224 * bundleCommand: "ram-bundle",
2325 *
2426 * // whether to bundle JS and assets in debug mode
@@ -76,7 +78,6 @@ import com.android.build.OutputFile
7678 */
7779
7880project. ext. react = [
79- entryFile : " index.js" ,
8081 enableHermes : false , // clean and rebuild if changing
8182]
8283
@@ -156,12 +157,13 @@ android {
156157 }
157158 release {
158159 // Caution! In production, you need to generate your own keystore file.
159- // see https://facebook.github.io/react-native /docs/signed-apk-android.
160+ // see https://reactnative.dev /docs/signed-apk-android.
160161 signingConfig signingConfigs. debug
161162 minifyEnabled enableProguardInReleaseBuilds
162163 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
163164 }
164165 }
166+
165167 // applicationVariants are e.g. debug, release
166168 applicationVariants. all { variant ->
167169 variant. outputs. each { output ->
@@ -176,28 +178,34 @@ android {
176178
177179 }
178180 }
179-
180- packagingOptions {
181- pickFirst ' **/armeabi-v7a/libc++_shared.so'
182- pickFirst ' **/x86/libc++_shared.so'
183- pickFirst ' **/arm64-v8a/libc++_shared.so'
184- pickFirst ' **/x86_64/libc++_shared.so'
185- pickFirst ' **/x86/libjsc.so'
186- pickFirst ' **/armeabi-v7a/libjsc.so'
187- }
188181}
189182
190183dependencies {
191- implementation project(' :react-native-gesture-handler' )
192184 implementation fileTree(dir : " libs" , include : [" *.jar" ])
185+ // noinspection GradleDynamicVersion
193186 implementation " com.facebook.react:react-native:+" // From node_modules
194187
188+ implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
189+
190+ debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " ) {
191+ exclude group :' com.facebook.fbjni'
192+ }
193+
194+ debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
195+ exclude group :' com.facebook.flipper'
196+ exclude group :' com.squareup.okhttp3' , module :' okhttp'
197+ }
198+
199+ debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ FLIPPER_VERSION} " ) {
200+ exclude group :' com.facebook.flipper'
201+ }
202+
195203 if (enableHermes) {
196- def hermesPath = " ../../node_modules/hermesvm /android/" ;
197- debugImplementation files(hermesPath + " hermes-debug.aar" )
198- releaseImplementation files(hermesPath + " hermes-release.aar" )
204+ def hermesPath = " ../../node_modules/hermes-engine /android/" ;
205+ debugImplementation files(hermesPath + " hermes-debug.aar" )
206+ releaseImplementation files(hermesPath + " hermes-release.aar" )
199207 } else {
200- implementation jscFlavor
208+ implementation jscFlavor
201209 }
202210}
203211
0 commit comments