Skip to content

Commit

Permalink
Use same JDK everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
WhosNickDoglio committed Nov 9, 2024
1 parent d2f97d4 commit 05e18fe
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ licensee {
allow("MIT")
}

kotlin { jvmToolchain(21) }
kotlin { jvmToolchain(libs.versions.jdk.get().toInt()) }

tasks.withType<com.diffplug.gradle.spotless.SpotlessTask>().configureEach {
notCompatibleWithConfigurationCache("https://github.com/diffplug/spotless/issues/987")
Expand Down
5 changes: 4 additions & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins {
`java-gradle-plugin`
}

kotlin { jvmToolchain(21) }
kotlin { jvmToolchain(libs.versions.jdk.get().toInt()) }

spotless {
format("misc") {
Expand Down Expand Up @@ -65,6 +65,9 @@ gradlePlugin {
}
}

// https://docs.gradle.org/8.9/userguide/gradle_daemon.html#daemon_jvm_criteria
tasks.updateDaemonJvm.configure { jvmVersion = JavaVersion.toVersion(libs.versions.jdk.get()) }

dependencies {
implementation(libs.android.gradle)
implementation(libs.detekt.gradle)
Expand Down
2 changes: 2 additions & 0 deletions build-logic/gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=21
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ plugins {
alias(libs.plugins.doctor)
alias(libs.plugins.gradle.versions)
}


// https://docs.gradle.org/8.9/userguide/gradle_daemon.html#daemon_jvm_criteria
tasks.updateDaemonJvm.configure { jvmVersion = JavaVersion.toVersion(libs.versions.jdk.get()) }
2 changes: 2 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=21
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sort = "0.12"
inject = "0.7.2"
sqldelight = "2.0.2"
ktor = "3.0.1"
jdk="21"

[plugins]
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
Expand Down

0 comments on commit 05e18fe

Please sign in to comment.