Skip to content

Commit

Permalink
Upgrade to Native Build Tools Plugin 0.9.21
Browse files Browse the repository at this point in the history
Closes gh-35055
  • Loading branch information
snicoll committed Apr 18, 2023
1 parent 9314362 commit 16563a6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
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;
Expand Down Expand Up @@ -96,15 +95,6 @@ private void configureTestNativeBinaryClasspath(Project project, SourceSetContai
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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ void classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath() {
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();
Expand Down

0 comments on commit 16563a6

Please sign in to comment.