mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Upgrade to Native Build Tools Plugin 0.9.21
Closes gh-35055
This commit is contained in:
parent
9314362c34
commit
16563a6a0a
@ -6,6 +6,6 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
|
|||||||
|
|
||||||
kotlinVersion=1.7.22
|
kotlinVersion=1.7.22
|
||||||
tomcatVersion=10.1.7
|
tomcatVersion=10.1.7
|
||||||
nativeBuildToolsVersion=0.9.20
|
nativeBuildToolsVersion=0.9.21
|
||||||
|
|
||||||
kotlin.stdlib.default.dependency=false
|
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.GraalVMExtension;
|
||||||
import org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension;
|
import org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension;
|
||||||
import org.gradle.api.Action;
|
import org.gradle.api.Action;
|
||||||
import org.gradle.api.GradleException;
|
|
||||||
import org.gradle.api.Plugin;
|
import org.gradle.api.Plugin;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
import org.gradle.api.artifacts.Configuration;
|
import org.gradle.api.artifacts.Configuration;
|
||||||
@ -96,15 +95,6 @@ class NativeImagePluginAction implements PluginApplicationAction {
|
|||||||
private GraalVMExtension configureGraalVmExtension(Project project) {
|
private GraalVMExtension configureGraalVmExtension(Project project) {
|
||||||
GraalVMExtension extension = project.getExtensions().getByType(GraalVMExtension.class);
|
GraalVMExtension extension = project.getExtensions().getByType(GraalVMExtension.class);
|
||||||
extension.getToolchainDetection().set(false);
|
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;
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,12 +115,6 @@ class NativeImagePluginActionIntegrationTests {
|
|||||||
projectPath("build/resources/aotTest"), projectPath("build/generated/aotTestClasses"));
|
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) {
|
private String projectPath(String path) {
|
||||||
try {
|
try {
|
||||||
return new File(this.gradleBuild.getProjectDir(), path).getCanonicalPath();
|
return new File(this.gradleBuild.getProjectDir(), path).getCanonicalPath();
|
||||||
|
Loading…
Reference in New Issue
Block a user