2023-10-06 12:35:13 +08:00
|
|
|
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "org.springframework.boot"
|
|
|
|
}
|
|
|
|
|
2024-08-23 22:11:55 +08:00
|
|
|
java {
|
|
|
|
sourceCompatibility = '17'
|
|
|
|
targetCompatibility = '17'
|
|
|
|
}
|
|
|
|
|
2023-10-06 12:35:13 +08:00
|
|
|
repositories {
|
2024-06-25 19:04:40 +08:00
|
|
|
maven { url "file:${rootDir}/../docker-test-maven-repository"}
|
2023-10-06 12:35:13 +08:00
|
|
|
mavenCentral()
|
2024-09-27 10:33:34 +08:00
|
|
|
spring.mavenRepositories()
|
2023-10-06 12:35:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-10-16 19:08:44 +08:00
|
|
|
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
|
2023-10-06 12:35:13 +08:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter")
|
2024-05-06 15:50:20 +08:00
|
|
|
implementation("org.bouncycastle:bcprov-jdk18on:1.78.1")
|
2023-10-06 12:35:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("bootJarUnpack", BootJar.class) {
|
|
|
|
mainClass = "org.springframework.boot.loaderapp.LoaderSignedJarTestApplication"
|
|
|
|
classpath = bootJar.classpath
|
|
|
|
requiresUnpack '**/bcprov-jdk18on-*.jar'
|
|
|
|
archiveClassifier.set("unpack")
|
|
|
|
targetJavaVersion = targetCompatibility
|
|
|
|
}
|
|
|
|
|
2024-05-06 15:50:20 +08:00
|
|
|
build.dependsOn bootJarUnpack
|