@@ -126,13 +126,9 @@ def jscFlavor = 'org.webkit:android-jsc:+'
126126def enableHermes = project. ext. react. get(" enableHermes" , false );
127127
128128android {
129+ ndkVersion rootProject. ext. ndkVersion
129130 compileSdkVersion rootProject. ext. compileSdkVersion
130131
131- compileOptions {
132- sourceCompatibility JavaVersion . VERSION_1_8
133- targetCompatibility JavaVersion . VERSION_1_8
134- }
135-
136132 defaultConfig {
137133 applicationId " com.example.intercomreactnative"
138134 minSdkVersion rootProject. ext. minSdkVersion
@@ -186,18 +182,21 @@ android {
186182 variant. outputs. each { output ->
187183 // For each separate APK per architecture, set a unique version code as described here:
188184 // https://developer.android.com/studio/build/configure-apk-splits.html
185+ // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
189186 def versionCodes = [" armeabi-v7a" : 1 , " x86" : 2 , " arm64-v8a" : 3 , " x86_64" : 4 ]
190187 def abi = output. getFilter(OutputFile . ABI )
191188 if (abi != null ) { // null for the universal-debug, universal-release variants
192189 output. versionCodeOverride =
193- versionCodes . get(abi) * 1048576 + defaultConfig . versionCode
190+ defaultConfig . versionCode * 1000 + versionCodes . get(abi)
194191 }
195192
196193 }
197194 }
198195}
199196
200197dependencies {
198+ // implementation("com.squareup.okhttp3:okhttp-urlconnection:4.9.1") <- required for applications that uses RN < 0.65
199+
201200 implementation fileTree(dir : " libs" , include : [" *.jar" ])
202201 // noinspection GradleDynamicVersion
203202 implementation " com.facebook.react:react-native:+" // From node_modules
@@ -232,7 +231,7 @@ dependencies {
232231// Run this once to be able to run the application with BUCK
233232// puts all compile dependencies into folder libs for BUCK to use
234233task copyDownloadableDepsToLibs (type : Copy ) {
235- from configurations. compile
234+ from configurations. implementation
236235 into ' libs'
237236}
238237
0 commit comments