11apply plugin : " com.android.application"
2+ apply plugin : " org.jetbrains.kotlin.android"
23apply plugin : " com.facebook.react"
34apply from : project(' :react-native-config' ). projectDir. getPath() + " /dotenv.gradle"
4- apply plugin : ' instabug-apm'
5-
6- import com.android.build.OutputFile
75
86/**
97 * This is the configuration block to customize your React Native Android app.
108 * By default you don't need to apply any configuration, just uncomment the lines you need.
119 */
1210react {
1311 /* Folders */
14- // The root of your project, i.e. where "package.json" lives. Default is '..'
15- // root = file("../")
16- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
17- // 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")
20- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
21- // cliFile = file("../node_modules/react-native/cli.js")
12+ // The root of your project, i.e. where "package.json" lives. Default is '../.. '
13+ // root = file("../../ ")
14+ // The folder where the react-native NPM package is. Default is ../../ node_modules/react-native
15+ // reactNativeDir = file("../../ node_modules/react-native")
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")
18+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../ node_modules/react-native/cli.js
19+ // cliFile = file("../../ node_modules/react-native/cli.js")
2220
2321 /* Variants */
2422 // The list of variants to that are debuggable. For those we're going to
@@ -52,6 +50,9 @@ react {
5250 //
5351 // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5452 // hermesFlags = ["-O", "-output-source-map"]
53+
54+ /* Autolinking */
55+ autolinkLibrariesWithApp()
5556}
5657
5758project. ext. vectoricons = [
@@ -60,14 +61,6 @@ project.ext.vectoricons = [
6061
6162apply from : " ../../node_modules/react-native-vector-icons/fonts.gradle"
6263
63- /**
64- * Set this to true to create four separate APKs instead of one,
65- * one for each native architecture. This is useful if you don't
66- * use App Bundles (https://developer.android.com/guide/app-bundle/)
67- * and want to have separate APKs to upload to the Play Store.
68- */
69- def enableSeparateBuildPerCPUArchitecture = false
70-
7164/**
7265 * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
7366 */
@@ -86,25 +79,10 @@ def enableProguardInReleaseBuilds = false
8679 */
8780def jscFlavor = ' org.webkit:android-jsc:+'
8881
89- /**
90- * Private function to get the list of Native Architectures you want to build.
91- * This reads the value from reactNativeArchitectures in your gradle.properties
92- * file and works together with the --active-arch-only flag of react-native run-android.
93- */
94- def reactNativeArchitectures () {
95- def value = project. getProperties(). get(" reactNativeArchitectures" )
96- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
97- }
98-
99- instabug {
100- apm {
101- networkEnabled = true
102- }
103- }
10482android {
10583 ndkVersion rootProject. ext. ndkVersion
106-
107- compileSdkVersion rootProject. ext. compileSdkVersion
84+ buildToolsVersion rootProject . ext . buildToolsVersion
85+ compileSdk rootProject. ext. compileSdkVersion
10886
10987 namespace " com.instabug.react.example"
11088 defaultConfig {
@@ -117,15 +95,6 @@ android {
11795 testBuildType System . getProperty(' testBuildType' , ' debug' ) // This will later be used to control the test apk build type
11896 testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
11997 }
120-
121- splits {
122- abi {
123- reset()
124- enable enableSeparateBuildPerCPUArchitecture
125- universalApk false // If true, also generate a universal APK
126- include (* reactNativeArchitectures())
127- }
128- }
12998 signingConfigs {
13099 debug {
131100 storeFile file(' debug.keystore' )
@@ -147,22 +116,6 @@ android {
147116 proguardFile " ${ rootProject.projectDir} /../node_modules/detox/android/detox/proguard-rules-app.pro"
148117 }
149118 }
150-
151- // applicationVariants are e.g. debug, release
152- applicationVariants. all { variant ->
153- variant. outputs. each { output ->
154- // For each separate APK per architecture, set a unique version code as described here:
155- // https://developer.android.com/studio/build/configure-apk-splits.html
156- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
157- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
158- def abi = output. getFilter(OutputFile . ABI )
159- if (abi != null ) { // null for the universal-debug, universal-release variants
160- output. versionCodeOverride =
161- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
162- }
163-
164- }
165- }
166119 externalNativeBuild {
167120 cmake {
168121 path file(' src/main/cpp/CMakeLists.txt' )
@@ -187,5 +140,3 @@ dependencies {
187140 androidTestImplementation(' com.wix:detox:+' ) { transitive = true }
188141 androidTestImplementation ' junit:junit:4.12'
189142}
190-
191- apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments