1
+ apply plugin : " kotlin-android"
1
2
apply plugin : " com.android.application"
2
3
apply plugin : " com.facebook.react"
3
4
apply plugin : " com.google.gms.google-services"
4
5
apply plugin : " com.google.firebase.crashlytics"
5
6
6
- import com.android.build.OutputFile
7
-
8
7
def projectRoot = rootDir. getAbsoluteFile(). getParentFile(). getAbsolutePath()
9
8
def expoDebuggableVariants = [' debug' ]
10
9
// Override `debuggableVariants` for expo-updates debugging
@@ -26,15 +25,15 @@ react {
26
25
debuggableVariants = expoDebuggableVariants
27
26
28
27
/* Folders */
29
- // The root of your project, i.e. where "package.json" lives. Default is '..'
30
- // root = file("../")
31
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
32
- // reactNativeDir = file("../node_modules/react-native")
33
- // The folder where the react-native Codegen package is. Default is ../node_modules/react-native- codegen
34
- // codegenDir = file("../node_modules/react-native- codegen")
35
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
36
- // cliFile = file("../node_modules/react-native/cli.js")
37
-
28
+ // The root of your project, i.e. where "package.json" lives. Default is '../.. '
29
+ // root = file("../../ ")
30
+ // The folder where the react-native NPM package is. Default is ../../ node_modules/react-native
31
+ // reactNativeDir = file("../../ node_modules/react-native")
32
+ // The folder where the react-native Codegen package is. Default is ../../ node_modules/@ react-native/ codegen
33
+ // codegenDir = file("../../ node_modules/@ react-native/ codegen")
34
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../ node_modules/react-native/cli.js
35
+ // cliFile = file("../../ node_modules/react-native/cli.js")
36
+
38
37
/* Variants */
39
38
// The list of variants to that are debuggable. For those we're going to
40
39
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
@@ -67,21 +66,16 @@ react {
67
66
//
68
67
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
69
68
// hermesFlags = ["-O", "-output-source-map"]
69
+
70
+ /* Autolinking */
71
+ autolinkLibrariesWithApp()
70
72
}
71
73
72
74
// Override `hermesEnabled` by `expo.jsEngine`
73
75
ext {
74
76
hermesEnabled = (findProperty(' expo.jsEngine' ) ?: " hermes" ) == " hermes"
75
77
}
76
78
77
- /**
78
- * Set this to true to create four separate APKs instead of one,
79
- * one for each native architecture. This is useful if you don't
80
- * use App Bundles (https://developer.android.com/guide/app-bundle/)
81
- * and want to have separate APKs to upload to the Play Store.
82
- */
83
- def enableSeparateBuildPerCPUArchitecture = false
84
-
85
79
/**
86
80
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
87
81
*/
@@ -100,39 +94,22 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
100
94
*/
101
95
def jscFlavor = ' org.webkit:android-jsc:+'
102
96
103
- /**
104
- * Private function to get the list of Native Architectures you want to build.
105
- * This reads the value from reactNativeArchitectures in your gradle.properties
106
- * file and works together with the --active-arch-only flag of react-native run-android.
107
- */
108
- def reactNativeArchitectures () {
109
- def value = project. getProperties(). get(" reactNativeArchitectures" )
110
- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
111
- }
112
-
113
97
android {
114
98
ndkVersion rootProject. ext. ndkVersion
115
99
116
- compileSdkVersion rootProject. ext. compileSdkVersion
100
+ buildToolsVersion rootProject. ext. buildToolsVersion
101
+ compileSdk rootProject. ext. compileSdkVersion
117
102
118
103
namespace " com.betterrail"
119
104
defaultConfig {
120
105
applicationId " com.betterrail"
121
106
minSdkVersion rootProject. ext. minSdkVersion
122
107
targetSdkVersion rootProject. ext. targetSdkVersion
123
- versionCode 84
124
- versionName " 2.3.2 "
108
+ versionCode 88
109
+ versionName " 2.3.3 "
125
110
missingDimensionStrategy " store" , " play"
126
111
}
127
112
128
- splits {
129
- abi {
130
- reset()
131
- enable enableSeparateBuildPerCPUArchitecture
132
- universalApk false // If true, also generate a universal APK
133
- include (* reactNativeArchitectures())
134
- }
135
- }
136
113
signingConfigs {
137
114
debug {
138
115
storeFile file(' debug.keystore' )
@@ -153,44 +130,18 @@ android {
153
130
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
154
131
}
155
132
}
156
-
157
- // applicationVariants are e.g. debug, release
158
- applicationVariants. all { variant ->
159
- variant. outputs. each { output ->
160
- // For each separate APK per architecture, set a unique version code as described here:
161
- // https://developer.android.com/studio/build/configure-apk-splits.html
162
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
163
- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
164
- def abi = output. getFilter(OutputFile . ABI )
165
- if (abi != null ) { // null for the universal-debug, universal-release variants
166
- output. versionCodeOverride =
167
- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
168
- }
169
-
170
- }
171
- }
172
133
}
173
134
174
135
dependencies {
175
136
// The version of react-native is set by the React Native Gradle Plugin
176
137
implementation(" com.facebook.react:react-android" )
177
-
178
- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" )
179
138
180
139
// RN BootSplash
181
140
implementation(" androidx.core:core-splashscreen:1.0.0" )
182
141
183
- debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
184
- debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
185
- exclude group :' com.squareup.okhttp3' , module :' okhttp'
186
- }
187
-
188
- debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ FLIPPER_VERSION} " )
189
142
if (hermesEnabled. toBoolean()) {
190
143
implementation(" com.facebook.react:hermes-android" )
191
144
} else {
192
145
implementation jscFlavor
193
146
}
194
147
}
195
-
196
- apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments