Files
spring-boot/system-test/spring-boot-image-system-tests/build.gradle
T
Hyunwoo Jung 6823d37408 Avoid using the deprecated Project.getProperties method
Gradle 9.6 deprecates Project.getProperties, which will be removed
in Gradle 10.

Use ProviderFactory.gradleProperty to read the required properties
in AntoraAsciidocAttributes and the image system tests build script.
Preserve null handling for missing Antora properties and fall back
to the project version when springBootVersion is not configured.

Update the provider mocks and add tests for the GraalVM
plugin version attribute.

Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>

See gh-51635
2026-09-09 10:42:17 +01:00

69 lines
2.1 KiB
Groovy

/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java-gradle-plugin'
id "org.springframework.boot.system-test"
}
description = "Spring Boot Image Building Tests"
configurations {
app
providedRuntime {
extendsFrom dependencyManagement
}
}
tasks.register("syncMavenRepository", Sync) {
from configurations.app
into layout.buildDirectory.dir("system-test-maven-repository")
}
systemTest {
dependsOn syncMavenRepository
systemProperty "springBootVersion",
providers.gradleProperty("springBootVersion").getOrElse(project.getVersion().toString())
}
dependencies {
app project(path: ":build-plugin:spring-boot-gradle-plugin", configuration: "mavenRepository")
app project(path: ":starter:spring-boot-starter-webmvc", configuration: "mavenRepository")
implementation(project(":starter:spring-boot-starter-webmvc")) {
exclude group: "org.hibernate.validator"
}
systemTestImplementation(project(":buildpack:spring-boot-buildpack-platform"))
systemTestImplementation(project(":starter:spring-boot-starter-test"))
systemTestImplementation(project(":test-support:spring-boot-gradle-test-support"))
systemTestImplementation(gradleTestKit())
systemTestImplementation("org.assertj:assertj-core")
systemTestImplementation("org.testcontainers:testcontainers-junit-jupiter")
}
toolchain {
maximumCompatibleJavaVersion = JavaLanguageVersion.of(23)
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}
tasks.named("compileSystemTestJava") {
options.nullability.checking = "tests"
}