From 5e2613917cf5ab6ff1d86412736d387c7be75316 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Fri, 19 Jul 2024 19:57:39 -0400 Subject: [PATCH] Update build.gradle --- android/build.gradle | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 6cb0866a0..6fbaa34e5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,8 +25,9 @@ buildscript { classpath("com.android.tools.build:gradle") classpath("com.bugsnag:bugsnag-android-gradle-plugin:5.+") classpath 'com.google.gms:google-services:4.4.2' // Google Services plugin - classpath("com.facebook.react:react-native-gradle-plugin") + classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } } @@ -36,13 +37,13 @@ allprojects { url("$rootDir/../node_modules/detox/Detox-android") } - mavenCentral { - // We don't want to fetch react-native from Maven Central as there are - // older versions over there. - content { - excludeGroup "com.facebook.react" - } - } + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm @@ -53,41 +54,28 @@ allprojects { url("$rootDir/../node_modules/jsc-android/dist") } google() - maven { url 'https://www.jitpack.io' } + maven { url 'https://www.jitpack.io' } } } subprojects { - afterEvaluate { project -> + afterEvaluate {project -> if (project.hasProperty("android")) { android { buildToolsVersion "34.0.0" compileSdkVersion 34 - defaultConfig { + defaultConfig { minSdkVersion 24 } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } - } - } } } - - // Apply the JVM target configuration only to 'rn-ldk' and 'react-native-true-sheet' - if (project.name == 'rn-ldk' || project.name == 'react-native-true-sheet') { - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) { kotlinOptions.jvmTarget = android.compileOptions.sourceCompatibility } else { kotlinOptions.jvmTarget = sourceCompatibility } } - } + } -} \ No newline at end of file +}