Skip to content

Commit

Permalink
Remove java.toolchain from build, fix Win arm64
Browse files Browse the repository at this point in the history
After #73, running `.\gradlew.bat build` on arm64 Windows would fail
with "WindowsRegistry is not supported on this operating system."
Removing the `java.toolchain` block from strcalc/build.gradle.kts allows
it to succeed, as Gradle no longer tries to query the Windows registry
to discover the Java toolchain. It will just pick up the toolchain from
the environment.

Running `.\gradlew.bat -q javaToolchains` will still produce the
failure, however.

See:
- https://docs.gradle.org/current/userguide/toolchains.html
- gradle/native-platform: WindowsRegistry is not supported on this
  operating system. #274
  gradle/native-platform#274 (comment)
- gradle/gradle: Support ARM64 Windows #21703
  gradle/gradle#21703
  • Loading branch information
mbland committed Dec 24, 2023
1 parent 8ef166f commit bbf05f5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions strcalc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ dependencies {
antJUnit(libs.antJunit)
}

// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

jacoco {
toolVersion = "0.8.11"
}
Expand Down

0 comments on commit bbf05f5

Please sign in to comment.