Skip to content

Commit

Permalink
fix: android compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sharjeelyunus committed Dec 23, 2024
1 parent 01d6477 commit 34b3d0d
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions starter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,35 @@ allprojects {

rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
if (project.extensions.findByName("android") != null) {
Integer pluginCompileSdk = project.android.compileSdk
if (pluginCompileSdk != null && pluginCompileSdk < 34) {

def javaVersion = JavaVersion.VERSION_17
project.android {
compileSdk 34
if (namespace == null) {
namespace project.group
}
compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
}
}
}
}

project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}

0 comments on commit 34b3d0d

Please sign in to comment.