1
1
apply plugin : " com.android.application"
2
+ apply plugin : " org.jetbrains.kotlin.android"
2
3
apply plugin : " com.facebook.react"
3
4
apply from : project(' :react-native-config' ). projectDir. getPath() + " /dotenv.gradle"
4
- apply plugin : ' instabug-apm'
5
-
6
- import com.android.build.OutputFile
7
5
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.
11
9
*/
12
10
react {
13
11
/* 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")
22
20
23
21
/* Variants */
24
22
// The list of variants to that are debuggable. For those we're going to
@@ -52,6 +50,9 @@ react {
52
50
//
53
51
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
54
52
// hermesFlags = ["-O", "-output-source-map"]
53
+
54
+ /* Autolinking */
55
+ autolinkLibrariesWithApp()
55
56
}
56
57
57
58
project. ext. vectoricons = [
@@ -60,14 +61,6 @@ project.ext.vectoricons = [
60
61
61
62
apply from : " ../../node_modules/react-native-vector-icons/fonts.gradle"
62
63
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
-
71
64
/**
72
65
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
73
66
*/
@@ -86,25 +79,10 @@ def enableProguardInReleaseBuilds = false
86
79
*/
87
80
def jscFlavor = ' org.webkit:android-jsc:+'
88
81
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
- }
104
82
android {
105
83
ndkVersion rootProject. ext. ndkVersion
106
-
107
- compileSdkVersion rootProject. ext. compileSdkVersion
84
+ buildToolsVersion rootProject . ext . buildToolsVersion
85
+ compileSdk rootProject. ext. compileSdkVersion
108
86
109
87
namespace " com.instabug.react.example"
110
88
defaultConfig {
@@ -117,15 +95,6 @@ android {
117
95
testBuildType System . getProperty(' testBuildType' , ' debug' ) // This will later be used to control the test apk build type
118
96
testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
119
97
}
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
- }
129
98
signingConfigs {
130
99
debug {
131
100
storeFile file(' debug.keystore' )
@@ -147,22 +116,6 @@ android {
147
116
proguardFile " ${ rootProject.projectDir} /../node_modules/detox/android/detox/proguard-rules-app.pro"
148
117
}
149
118
}
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
- }
166
119
externalNativeBuild {
167
120
cmake {
168
121
path file(' src/main/cpp/CMakeLists.txt' )
@@ -187,5 +140,3 @@ dependencies {
187
140
androidTestImplementation(' com.wix:detox:+' ) { transitive = true }
188
141
androidTestImplementation ' junit:junit:4.12'
189
142
}
190
-
191
- apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments