Enable bootJar
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
import java.time.ZonedDateTime
|
|
||||||
import java.time.format.DateTimeFormatter
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
jacoco
|
jacoco
|
||||||
@@ -51,22 +49,6 @@ tasks.jacocoTestReport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
|
|
||||||
|
|
||||||
tasks.jar {
|
|
||||||
doFirst {
|
|
||||||
manifest {
|
|
||||||
attributes["Implementation-Title"] = rootProject.name
|
|
||||||
attributes["Implementation-Version"] = archiveVersion.get()
|
|
||||||
attributes["Implementation-Vendor"] = "Jim Martens"
|
|
||||||
attributes["Build-Timestamp"] = ZonedDateTime.now().format(formatter)
|
|
||||||
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
|
|
||||||
attributes["Build-Jdk"] = "${providers.systemProperty("java.version").get()} (${providers.systemProperty("java.vendor").get()} ${providers.systemProperty("java.vm.version").get()})"
|
|
||||||
attributes["Build-OS"] = "${providers.systemProperty("os.name").get()} ${providers.systemProperty("os.arch").get()} ${providers.systemProperty("os.version").get()}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
normalization.runtimeClasspath.metaInf {
|
normalization.runtimeClasspath.metaInf {
|
||||||
ignoreAttribute("Build-Timestamp")
|
ignoreAttribute("Build-Timestamp")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
|
import java.time.ZonedDateTime
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
import java.time.format.DateTimeFormatter.ofPattern
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.springframework.boot")
|
id("org.springframework.boot")
|
||||||
@@ -57,27 +60,21 @@ tasks.named("buildAll") {
|
|||||||
dependsOn("integrationTest")
|
dependsOn("integrationTest")
|
||||||
}
|
}
|
||||||
|
|
||||||
springBoot {
|
val formatter: DateTimeFormatter = ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
|
||||||
buildInfo()
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.bootJar {
|
tasks.bootJar {
|
||||||
enabled = false
|
manifest {
|
||||||
|
attributes["Implementation-Title"] = rootProject.name
|
||||||
|
attributes["Implementation-Version"] = archiveVersion.get()
|
||||||
|
attributes["Implementation-Vendor"] = "Jim Martens"
|
||||||
|
attributes["Build-Timestamp"] = ZonedDateTime.now().format(formatter)
|
||||||
|
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
|
||||||
|
attributes["Build-Jdk"] = "${providers.systemProperty("java.version").get()} (${providers.systemProperty("java.vendor").get()} ${providers.systemProperty("java.vm.version").get()})"
|
||||||
|
attributes["Build-OS"] = "${providers.systemProperty("os.name").get()} ${providers.systemProperty("os.arch").get()} ${providers.systemProperty("os.version").get()}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
springBoot {
|
||||||
enabled = true
|
buildInfo()
|
||||||
archiveClassifier.set("")
|
mainClass.set("de.twomartens.wahlrecht.MainApplicationKt")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.bootDistZip {
|
|
||||||
dependsOn(tasks.jar)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.bootDistTar {
|
|
||||||
dependsOn(tasks.jar)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.bootStartScripts {
|
|
||||||
dependsOn(tasks.jar)
|
|
||||||
}
|
|
||||||
@@ -10,4 +10,4 @@ dependencies {
|
|||||||
annotationProcessor(libs.mapstruct.processor)
|
annotationProcessor(libs.mapstruct.processor)
|
||||||
kapt(libs.mapstruct.processor)
|
kapt(libs.mapstruct.processor)
|
||||||
implementation(libs.spring.cloud.starter.config)
|
implementation(libs.spring.cloud.starter.config)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user