Upgrade to Native Build Tools Plugin 0.9.21

Closes gh-35055
pull/35377/head
Stephane Nicoll 2 years ago
parent 9314362c34
commit 16563a6a0a

@ -6,6 +6,6 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
kotlinVersion=1.7.22
tomcatVersion=10.1.7
nativeBuildToolsVersion=0.9.20
nativeBuildToolsVersion=0.9.21
kotlin.stdlib.default.dependency=false

@ -24,7 +24,6 @@ import org.graalvm.buildtools.gradle.NativeImagePlugin;
import org.graalvm.buildtools.gradle.dsl.GraalVMExtension;
import org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension;
import org.gradle.api.Action;
import org.gradle.api.GradleException;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
@ -96,15 +95,6 @@ class NativeImagePluginAction implements PluginApplicationAction {
private GraalVMExtension configureGraalVmExtension(Project project) {
GraalVMExtension extension = project.getExtensions().getByType(GraalVMExtension.class);
extension.getToolchainDetection().set(false);
extension.getBinaries().configureEach((options) -> {
try {
options.getRequiredVersion().convention("22.3");
}
catch (NoSuchMethodError ex) {
throw new GradleException("Incompatible version of org.graalvm.buildtools.native plugin. "
+ "Please upgrade to 0.9.17 or later.");
}
});
return extension;
}

@ -115,12 +115,6 @@ class NativeImagePluginActionIntegrationTests {
projectPath("build/resources/aotTest"), projectPath("build/generated/aotTestClasses"));
}
@TestTemplate
void nativeImageBinariesRequireGraal22Dot3() {
BuildResult result = this.gradleBuild.build("requiredGraalVersion");
assertThat(result.getOutput()).contains("custom: 22.3", "main: 22.3", "test: 22.3");
}
private String projectPath(String path) {
try {
return new File(this.gradleBuild.getProjectDir(), path).getCanonicalPath();

Loading…
Cancel
Save