mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Merge branch '3.1.x'
This commit is contained in:
commit
7c23c0b3c2
@ -44,6 +44,11 @@ public final class GradleVersions {
|
|||||||
return allCompatible().get(0);
|
return allCompatible().get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String maximumCompatible() {
|
||||||
|
List<String> versions = allCompatible();
|
||||||
|
return versions.get(versions.size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean isJavaVersion(JavaVersion version) {
|
private static boolean isJavaVersion(JavaVersion version) {
|
||||||
return JavaVersion.current().isCompatibleWith(version);
|
return JavaVersion.current().isCompatibleWith(version);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ import org.springframework.boot.image.assertions.ImageAssertions;
|
|||||||
import org.springframework.boot.image.junit.GradleBuildInjectionExtension;
|
import org.springframework.boot.image.junit.GradleBuildInjectionExtension;
|
||||||
import org.springframework.boot.testsupport.gradle.testkit.GradleBuild;
|
import org.springframework.boot.testsupport.gradle.testkit.GradleBuild;
|
||||||
import org.springframework.boot.testsupport.gradle.testkit.GradleBuildExtension;
|
import org.springframework.boot.testsupport.gradle.testkit.GradleBuildExtension;
|
||||||
|
import org.springframework.boot.testsupport.gradle.testkit.GradleVersions;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
@ -72,6 +73,7 @@ class PaketoBuilderTests {
|
|||||||
this.gradleBuild.scriptPropertyFrom(new File("../../gradle.properties"), "nativeBuildToolsVersion");
|
this.gradleBuild.scriptPropertyFrom(new File("../../gradle.properties"), "nativeBuildToolsVersion");
|
||||||
this.gradleBuild.expectDeprecationMessages("BPL_SPRING_CLOUD_BINDINGS_ENABLED.*true.*Deprecated");
|
this.gradleBuild.expectDeprecationMessages("BPL_SPRING_CLOUD_BINDINGS_ENABLED.*true.*Deprecated");
|
||||||
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated");
|
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated");
|
||||||
|
this.gradleBuild.gradleVersion(GradleVersions.maximumCompatible());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -299,6 +301,9 @@ class PaketoBuilderTests {
|
|||||||
void nativeApp() throws Exception {
|
void nativeApp() throws Exception {
|
||||||
this.gradleBuild.expectDeprecationMessages("uses or overrides a deprecated API");
|
this.gradleBuild.expectDeprecationMessages("uses or overrides a deprecated API");
|
||||||
this.gradleBuild.expectDeprecationMessages("has been deprecated and marked for removal");
|
this.gradleBuild.expectDeprecationMessages("has been deprecated and marked for removal");
|
||||||
|
// these deprecations are transitive from the Native Build Tools Gradle plugin
|
||||||
|
this.gradleBuild.expectDeprecationMessages("has been deprecated. This is scheduled to be removed in Gradle 9.0");
|
||||||
|
this.gradleBuild.expectDeprecationMessages("upgrading_version_8.html#deprecated_access_to_convention");
|
||||||
writeMainClass();
|
writeMainClass();
|
||||||
String imageName = "paketo-integration/" + this.gradleBuild.getProjectDir().getName();
|
String imageName = "paketo-integration/" + this.gradleBuild.getProjectDir().getName();
|
||||||
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
||||||
|
@ -38,5 +38,5 @@ application {
|
|||||||
|
|
||||||
bootBuildImage {
|
bootBuildImage {
|
||||||
archiveFile = bootDistZip.archiveFile
|
archiveFile = bootDistZip.archiveFile
|
||||||
environment = ['BP_JVM_VERSION': project.targetCompatibility.getMajorVersion()]
|
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion()]
|
||||||
}
|
}
|
@ -38,5 +38,5 @@ application {
|
|||||||
|
|
||||||
bootBuildImage {
|
bootBuildImage {
|
||||||
archiveFile = distZip.archiveFile
|
archiveFile = distZip.archiveFile
|
||||||
environment = ['BP_JVM_VERSION': project.targetCompatibility.getMajorVersion()]
|
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion()]
|
||||||
}
|
}
|
@ -31,5 +31,5 @@ war {
|
|||||||
|
|
||||||
bootBuildImage {
|
bootBuildImage {
|
||||||
archiveFile = war.archiveFile
|
archiveFile = war.archiveFile
|
||||||
environment = ['BP_JVM_VERSION': project.targetCompatibility.getMajorVersion(), 'BP_TOMCAT_VERSION': '10.*']
|
environment = ['BP_JVM_VERSION': java.targetCompatibility.getMajorVersion(), 'BP_TOMCAT_VERSION': '10.*']
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user