mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
67 lines
2.2 KiB
Groovy
67 lines
2.2 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "org.springframework.boot.conventions"
|
|
id "org.springframework.boot.integration-test"
|
|
id "de.undercouch.download"
|
|
}
|
|
|
|
description = "Spring Boot Launch Script Integration Tests"
|
|
|
|
def jdkVersion = "17.0.8.1+1"
|
|
def jdkArch = "aarch64".equalsIgnoreCase(System.getProperty("os.arch")) ? "aarch64" : "amd64"
|
|
|
|
configurations {
|
|
app
|
|
}
|
|
|
|
dependencies {
|
|
app project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository")
|
|
app project(path: ":spring-boot-project:spring-boot-parent", configuration: "mavenRepository")
|
|
app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository")
|
|
|
|
intTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
|
intTestImplementation("org.testcontainers:testcontainers")
|
|
}
|
|
|
|
task syncMavenRepository(type: Sync) {
|
|
from configurations.app
|
|
into "${buildDir}/int-test-maven-repository"
|
|
}
|
|
|
|
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
|
|
sourceDirectory = file("spring-boot-launch-script-tests-app")
|
|
destinationDirectory = file("${buildDir}/spring-boot-launch-script-tests-app")
|
|
}
|
|
|
|
task buildApp(type: GradleBuild) {
|
|
dependsOn syncAppSource, syncMavenRepository
|
|
dir = "${buildDir}/spring-boot-launch-script-tests-app"
|
|
startParameter.buildCacheEnabled = false
|
|
tasks = ["build"]
|
|
}
|
|
|
|
task downloadJdk(type: Download) {
|
|
def destFolder = new File(project.gradle.gradleUserHomeDir, "caches/springboot/downloads/jdk/bellsoft")
|
|
destFolder.mkdirs()
|
|
src "https://download.bell-sw.com/java/${jdkVersion}/bellsoft-jdk${jdkVersion}-linux-${jdkArch}.tar.gz"
|
|
dest destFolder
|
|
tempAndMove true
|
|
overwrite false
|
|
}
|
|
|
|
task syncJdkDownloads(type: Sync) {
|
|
dependsOn downloadJdk
|
|
from "${project.gradle.gradleUserHomeDir}/caches/springboot/downloads/jdk/bellsoft/"
|
|
include "bellsoft-jdk${jdkVersion}-linux-${jdkArch}.tar.gz"
|
|
into "${project.buildDir}/downloads/jdk/bellsoft/"
|
|
}
|
|
|
|
processIntTestResources {
|
|
dependsOn syncJdkDownloads
|
|
}
|
|
|
|
intTest {
|
|
dependsOn buildApp
|
|
} |