Skip to content

Commit

Permalink
build: Apply toolchain resolver
Browse files Browse the repository at this point in the history
* This can get rid of Gradle's strong dependence on JDK version
  • Loading branch information
YuKongA committed Jun 4, 2024
1 parent ea333e6 commit 71d8c9b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ android {
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(22)
}
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.majorVersion
kotlin {
jvmToolchain(22)
}
}

Expand Down
11 changes: 6 additions & 5 deletions hidden-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ android {
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"))
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(22)
}
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.majorVersion
kotlin {
jvmToolchain(22)
}
}

Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ dependencyResolutionManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
}

rootProject.name = "HyperCeiler"
include(":app")
include(":hidden-api")

0 comments on commit 71d8c9b

Please sign in to comment.