11apply plugin : " com.android.application"
2+ apply plugin : " org.jetbrains.kotlin.android"
23apply plugin : " com.facebook.react"
34
4- import com.android.build.OutputFile
55
66// project.ext.react = [
77// entryFile: "index.js",
@@ -17,8 +17,8 @@ react {
1717 root = file(" ../../" )
1818 // The folder where the react-native NPM package is. Default is ../node_modules/react-native
1919 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")
2222 // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
2323 // cliFile = file("../node_modules/react-native/cli.js")
2424 /* Variants */
@@ -51,14 +51,9 @@ react {
5151 //
5252 // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5353 // hermesFlags = ["-O", "-output-source-map"]
54+ autolinkLibrariesWithApp()
5455}
5556
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
6257/**
6358 * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
6459 */
@@ -75,18 +70,13 @@ def enableProguardInReleaseBuilds = false
7570 * this variant is about 6MiB larger per architecture than default.
7671 */
7772def 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- }
8673
8774android {
88- compileSdkVersion rootProject. ext. compileSdkVersion
8975 ndkVersion rootProject. ext. ndkVersion
76+
77+ buildToolsVersion rootProject. ext. buildToolsVersion
78+ compileSdk rootProject. ext. compileSdkVersion
79+
9080 namespace " com.rnuilib"
9181
9282 defaultConfig {
@@ -98,14 +88,15 @@ android {
9888 multiDexEnabled true
9989 }
10090
101- splits {
102- abi {
103- reset()
104- enable enableSeparateBuildPerCPUArchitecture
105- universalApk false // If true, also generate a universal APK
106- include ( * reactNativeArchitectures())
107- }
91+ compileOptions {
92+ sourceCompatibility JavaVersion . VERSION_17
93+ targetCompatibility JavaVersion . VERSION_17
94+ }
95+
96+ kotlinOptions {
97+ jvmTarget = ' 17 '
10898 }
99+
109100 signingConfigs {
110101 debug {
111102 storeFile file(' debug.keystore' )
@@ -126,34 +117,12 @@ android {
126117 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
127118 }
128119 }
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- }
145120}
146121
147122dependencies {
148123 // The version of react-native is set by the React Native Gradle Plugin
149124 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} " )
125+ implementation(" com.facebook.react:flipper-integration:0.73.9" )
157126
158127 implementation project(' :react-native-navigation' )
159128 implementation project(' :react-native-ui-lib' )
@@ -167,4 +136,4 @@ dependencies {
167136 }
168137}
169138
170- apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
139+ // apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
0 commit comments