You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.1 KiB
60 lines
2.1 KiB
plugins { |
|
id 'java-gradle-plugin' |
|
id "org.springframework.boot.system-test" |
|
} |
|
|
|
description = "Spring Boot Image Building Tests" |
|
|
|
configurations { |
|
app |
|
providedRuntime { |
|
extendsFrom dependencyManagement |
|
} |
|
all { |
|
resolutionStrategy { |
|
eachDependency { dependency -> |
|
// Downgrade Jackson as Gradle cannot cope with 2.15.0's multi-version |
|
// jar files with bytecode in META-INF/versions/19 |
|
if (dependency.requested.group.startsWith("com.fasterxml.jackson")) { |
|
dependency.useVersion("2.14.2") |
|
} |
|
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's |
|
// multi-version jar files with bytecode in META-INF/versions/21 |
|
if (dependency.requested.group.equals("org.springframework")) { |
|
dependency.useVersion("$springFramework60xVersion") |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
task syncMavenRepository(type: Sync) { |
|
from configurations.app |
|
into layout.buildDirectory.dir("system-test-maven-repository") |
|
} |
|
|
|
systemTest { |
|
dependsOn syncMavenRepository |
|
if (project.hasProperty("springBootVersion")) { |
|
systemProperty "springBootVersion", project.properties["springBootVersion"] |
|
} else { |
|
systemProperty "springBootVersion", project.getVersion() |
|
} |
|
} |
|
|
|
dependencies { |
|
app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository") |
|
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository") |
|
|
|
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) { |
|
exclude group: "org.hibernate.validator" |
|
} |
|
|
|
systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) |
|
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support")) |
|
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform")) |
|
systemTestImplementation(gradleTestKit()) |
|
systemTestImplementation("org.assertj:assertj-core") |
|
systemTestImplementation("org.testcontainers:junit-jupiter") |
|
systemTestImplementation("org.testcontainers:testcontainers") |
|
}
|
|
|