Update build.gradle

This commit is contained in:
Marcos Rodriguez Vélez 2024-07-18 01:38:21 -04:00 committed by GitHub
parent 0b111fb89c
commit 54381898cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,4 +56,29 @@ allprojects {
google() google()
maven { url 'https://www.jitpack.io' } maven { url 'https://www.jitpack.io' }
} }
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
buildToolsVersion "34.0.0"
compileSdkVersion 33
defaultConfig {
minSdkVersion 24
}
}
}
// Check if the project name is 'rn-ldk' before applying the Kotlin compile options
if (project.name == 'rn-ldk') {
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
}
}
}
}
} }