|
|
|
|
@ -1,37 +1,32 @@
|
|
|
|
|
import java.nio.charset.StandardCharsets
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
id 'java'
|
|
|
|
|
id 'war'
|
|
|
|
|
id 'org.springframework.boot' version '3.4.5' apply false
|
|
|
|
|
id 'org.springframework.boot' version '3.4.5'
|
|
|
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.processResources {
|
|
|
|
|
filteringCharset = 'UTF-8'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
group = 'com.bsmlab.dfx'
|
|
|
|
|
version = '0.1'
|
|
|
|
|
|
|
|
|
|
// git commit hash -> application.yml
|
|
|
|
|
def gitCommitId = ''
|
|
|
|
|
try {
|
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
|
providers.exec {
|
|
|
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
|
|
|
standardOutput = stdout;
|
|
|
|
|
}.result.get()
|
|
|
|
|
gitCommitId = stdout.toString().trim()
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ignored) {
|
|
|
|
|
print "git commit ID is not available."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// gradle project properties -> application.yml
|
|
|
|
|
processResources {
|
|
|
|
|
tasks.processResources {
|
|
|
|
|
filteringCharset = 'UTF-8'
|
|
|
|
|
filesMatching('**/application.yml') {
|
|
|
|
|
expand(project.properties + [
|
|
|
|
|
commitId: gitCommitId, version: version,
|
|
|
|
|
def commitId = providers.exec {
|
|
|
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
|
|
|
}.standardOutput.asText.get()
|
|
|
|
|
expand([
|
|
|
|
|
commitId: commitId,
|
|
|
|
|
version : project.version,
|
|
|
|
|
user : [home: System.getProperty('user.home')]
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
toolchain {
|
|
|
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
|
@ -42,10 +37,6 @@ repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
|
apply plugin: 'war'
|
|
|
|
|
|
|
|
|
|
bootWar {
|
|
|
|
|
enabled = true
|
|
|
|
|
}
|
|
|
|
|
@ -54,6 +45,10 @@ bootJar {
|
|
|
|
|
enabled = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
war {
|
|
|
|
|
enabled = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
|
|
|
|
|
|