Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests across a range of JDKs #75

Merged
merged 10 commits into from
Sep 6, 2024
Merged

Run tests across a range of JDKs #75

merged 10 commits into from
Sep 6, 2024

Conversation

bartekpacia
Copy link
Contributor

@bartekpacia bartekpacia commented Sep 3, 2024

Clean up/follow-up of Igor's PR here

@bartekpacia
Copy link
Contributor Author

bartekpacia commented Sep 3, 2024

This will probably fail because of Android SDK tools requiring Java 17.

Therefore to make this work I will take the same approach as in Masetro:

  • use latest Java and Gradle
  • set -release for javac and -Xjdk-target for kotlinc
  • test on lowest supported Java (8), like we do in Maestro

EDIT

The above approach turned out to be problematic because of this:

graalvmNative {
binaries {
all {
buildArgs.add("-H:+EnableAllSecurityServices")
javaLauncher.set(provider {
val output = tasks.extractGraalTooling.get().outputs.files.singleFile
val javaHome = if (OperatingSystem.current().isMacOsX) output.resolve("Contents/Home") else output
val metadata = metadataDetector.getMetadata(javaHome)
if (!metadata.isValidInstallation) {
throw RuntimeException(metadata.errorMessage)
}
val spec = objects.newInstance(DefaultToolchainSpec::class.java).apply {
languageVersion.set(JavaLanguageVersion.of(java.targetCompatibility.majorVersion))
}
val javaToolchain = toolchainFactory.newInstance(javaHome, JavaToolchainInput(spec))
javaToolchain.get().javaLauncher
})
}
}
}

not wanting to spend too much time on it, I went the other way: just fix all NoSuchMethodErrors – turns out there were only 2 such places.

@bartekpacia bartekpacia force-pushed the ci/upgrade branch 2 times, most recently from ac45f06 to b3685c8 Compare September 6, 2024 15:08
@bartekpacia bartekpacia merged commit b40357b into master Sep 6, 2024
3 checks passed
@bartekpacia bartekpacia deleted the ci/upgrade branch September 6, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants