1
1
apply plugin : " com.android.application"
2
+ apply plugin : " org.jetbrains.kotlin.android"
2
3
apply plugin : " com.facebook.react"
3
4
4
- import com.android.build.OutputFile
5
5
6
6
// project.ext.react = [
7
7
// entryFile: "index.js",
@@ -17,8 +17,8 @@ react {
17
17
root = file(" ../../" )
18
18
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
19
19
reactNativeDir = file(" ../../node_modules/react-native" )
20
- // The folder where the react-native Codegen package is. Default is ../node_modules/react-native- codegen
21
- // codegenDir = file("../node_modules/react-native- codegen")
20
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@ react-native/ codegen
21
+ // codegenDir = file("../node_modules/@ react-native/ codegen")
22
22
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
23
23
// cliFile = file("../node_modules/react-native/cli.js")
24
24
/* Variants */
@@ -53,12 +53,6 @@ react {
53
53
// hermesFlags = ["-O", "-output-source-map"]
54
54
}
55
55
56
- /* Set this to true to create four separate APKs instead of one,
57
- * one for each native architecture. This is useful if you don't
58
- * use App Bundles (https://developer.android.com/guide/app-bundle/)
59
- * and want to have separate APKs to upload to the Play Store.
60
- */
61
- def enableSeparateBuildPerCPUArchitecture = false
62
56
/**
63
57
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
64
58
*/
@@ -75,18 +69,13 @@ def enableProguardInReleaseBuilds = false
75
69
* this variant is about 6MiB larger per architecture than default.
76
70
*/
77
71
def jscFlavor = ' org.webkit:android-jsc:+'
78
- /* Private function to get the list of Native Architectures you want to build.
79
- * This reads the value from reactNativeArchitectures in your gradle.properties
80
- * file and works together with the --active-arch-only flag of react-native run-android.
81
- */
82
- def reactNativeArchitectures () {
83
- def value = project. getProperties(). get(" reactNativeArchitectures" )
84
- return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
85
- }
86
72
87
73
android {
88
- compileSdkVersion rootProject. ext. compileSdkVersion
89
74
ndkVersion rootProject. ext. ndkVersion
75
+
76
+ buildToolsVersion rootProject. ext. buildToolsVersion
77
+ compileSdk rootProject. ext. compileSdkVersion
78
+
90
79
namespace " com.rnuilib"
91
80
92
81
defaultConfig {
@@ -98,14 +87,6 @@ android {
98
87
multiDexEnabled true
99
88
}
100
89
101
- splits {
102
- abi {
103
- reset()
104
- enable enableSeparateBuildPerCPUArchitecture
105
- universalApk false // If true, also generate a universal APK
106
- include (* reactNativeArchitectures())
107
- }
108
- }
109
90
signingConfigs {
110
91
debug {
111
92
storeFile file(' debug.keystore' )
@@ -126,34 +107,12 @@ android {
126
107
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
127
108
}
128
109
}
129
-
130
- // applicationVariants are e.g. debug, release
131
- applicationVariants. all { variant ->
132
- variant. outputs. each { output ->
133
- // For each separate APK per architecture, set a unique version code as described here:
134
- // https://developer.android.com/studio/build/configure-apk-splits.html
135
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
136
- def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
137
- def abi = output. getFilter(OutputFile . ABI )
138
- if (abi != null ) { // null for the universal-debug, universal-release variants
139
- output. versionCodeOverride =
140
- defaultConfig. versionCode * 1000 + versionCodes. get(abi)
141
- }
142
-
143
- }
144
- }
145
110
}
146
111
147
112
dependencies {
148
113
// The version of react-native is set by the React Native Gradle Plugin
149
114
implementation(" com.facebook.react:react-android" )
150
- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" )
151
-
152
- debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
153
- debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
154
- exclude group :' com.squareup.okhttp3' , module :' okhttp'
155
- }
156
- debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ FLIPPER_VERSION} " )
115
+ implementation(" com.facebook.react:flipper-integration" )
157
116
158
117
implementation project(' :react-native-navigation' )
159
118
implementation project(' :react-native-ui-lib' )
0 commit comments