From 13fe4675f2dc037daf9ddcb221647dfcd9fa7c80 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 16 May 2023 21:36:05 -0700 Subject: [PATCH 1/4] fix: use defensive kotlin version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 4a3e823..150ec64 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = "1.5.30" + ext.kotlinVersion = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : "1.5.30" repositories { google() mavenCentral() From dbd62705da6a8760f1516697343a1868eb0ce957 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Wed, 17 May 2023 10:58:05 -0700 Subject: [PATCH 2/4] fix: add kt stdlib jdk8 --- android/build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 150ec64..00ceda6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : "1.5.30" + def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : "1.5.30" repositories { google() mavenCentral() @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -56,4 +56,5 @@ repositories { dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } From 20d7cd880d867eac83cdfb631a99e14095509d6a Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Thu, 18 May 2023 10:35:50 -0700 Subject: [PATCH 3/4] fix: update gradle and android tools --- android/build.gradle | 12 ++++++------ android/gradle.properties | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 00ceda6..393e730 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : "1.5.30" + def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['ExperimentReactNativeClient_kotlinVersion'] repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:7.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -19,11 +19,11 @@ def safeExtGet(prop, fallback) { } android { - compileSdkVersion safeExtGet('ExperimentReactNativeClient_compileSdkVersion', 29) - buildToolsVersion safeExtGet('ExperimentReactNativeClient_buildToolsVersion', '29.0.2') + compileSdkVersion safeExtGet('ExperimentReactNativeClient_compileSdkVersion', 31) + buildToolsVersion safeExtGet('ExperimentReactNativeClient_buildToolsVersion', '31.0.0') defaultConfig { - minSdkVersion safeExtGet('ExperimentReactNativeClient_minSdkVersion', 16) - targetSdkVersion safeExtGet('ExperimentReactNativeClient_targetSdkVersion', 29) + minSdkVersion safeExtGet('ExperimentReactNativeClient_minSdkVersion', 21) + targetSdkVersion safeExtGet('ExperimentReactNativeClient_targetSdkVersion', 31) versionCode 1 versionName "1.0" diff --git a/android/gradle.properties b/android/gradle.properties index 0695add..aeefd0f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,7 @@ +ExperimentReactNativeClient_kotlinVersion=1.6.21 +ExperimentReactNativeClient_compileSdkVersion=31 +ExperimentReactNativeClient_buildToolsVersion=31.0.0 +ExperimentReactNativeClient_targetSdkVersion=31 android.useAndroidX=true android.enableJetifier=true kotlin.code.style=official From 3edb42f2036f0eb532b13c8868b56501719adce2 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Thu, 18 May 2023 11:01:23 -0700 Subject: [PATCH 4/4] fix: remove kt stdlin dep --- android/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 393e730..20d4c9d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -56,5 +56,4 @@ repositories { dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" }