|
|
|
plugins {
|
|
|
|
id 'org.springframework.boot' version '2.7.5'
|
|
|
|
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
|
|
|
|
id 'org.asciidoctor.convert' version '1.5.8'
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
|
|
|
group = 'cokr.xit.ntri'
|
|
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
sourceCompatibility = '11'
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
|
|
|
set('snippetsDir', file("build/generated-snippets"))
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-configuration-processor'
|
|
|
|
runtimeOnly 'com.oracle.database.jdbc:ojdbc8'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
|
|
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
|
|
|
|
|
|
|
|
/*====================================================================================
|
|
|
|
* Springdoc - swagger
|
|
|
|
====================================================================================*/
|
|
|
|
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
|
|
|
|
|
|
|
|
/*====================================================================================
|
|
|
|
* lombok
|
|
|
|
====================================================================================*/
|
|
|
|
implementation 'org.projectlombok:lombok'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
|
|
|
|
/*====================================================================================
|
|
|
|
* commons-io
|
|
|
|
====================================================================================*/
|
|
|
|
implementation 'org.apache.commons:commons-io:1.3.2'
|
|
|
|
|
|
|
|
|
|
|
|
/*====================================================================================
|
|
|
|
* external library
|
|
|
|
====================================================================================*/
|
|
|
|
implementation fileTree(dir: 'libs', includes: ['*.jar'])
|
|
|
|
// implementation files("libs/ojdbc8.jar")
|
|
|
|
}
|
|
|
|
|
|
|
|
//processResources {
|
|
|
|
// filesMatching('**/application.yml') {
|
|
|
|
// expand(project.properties)
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
//processResources {
|
|
|
|
// with copySpec {
|
|
|
|
// from 'src/main/resources'
|
|
|
|
// include '**/application.yml'
|
|
|
|
//// include '**/application*.yaml'
|
|
|
|
//// include '**/application*.properties'
|
|
|
|
// project.properties.findAll().each {
|
|
|
|
// prop ->
|
|
|
|
// if (prop.value != null) {
|
|
|
|
// filter(ReplaceTokens, tokens: [ (prop.key): prop.value])
|
|
|
|
// filter(ReplaceTokens, tokens: [ ('project.' + prop.key): prop.value])
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
ext{
|
|
|
|
index = '1'
|
|
|
|
string ="gradleString"
|
|
|
|
}
|
|
|
|
ext.profile = (!project.hasProperty('profile') || !profile) ? 'dev' : profile
|
|
|
|
ext.springProfilesActive = System.properties['spring.profiles.active']
|
|
|
|
sourceSets {
|
|
|
|
println("springProfilesActive:::::: $springProfilesActive")
|
|
|
|
println("\$profile:::::: $profile")
|
|
|
|
println("project.profile:::::: " + project.profile)
|
|
|
|
println("\$project.profile:::::: $project.profile")
|
|
|
|
println("\$project.ext.profile:::::: $project.ext.profile")
|
|
|
|
|
|
|
|
main {
|
|
|
|
resources {
|
|
|
|
srcDirs "src/main/resources", "src/main/resources-env/${profile}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tasks {
|
|
|
|
processResources {
|
|
|
|
// filesMatching('**/application.yml') {
|
|
|
|
// expand(project.properties)
|
|
|
|
// }
|
|
|
|
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tasks.named('test') {
|
|
|
|
outputs.dir snippetsDir
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named('asciidoctor') {
|
|
|
|
inputs.dir snippetsDir
|
|
|
|
dependsOn test
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named('compileJava') {
|
|
|
|
inputs.files(tasks.named('processResources'))
|
|
|
|
}
|
|
|
|
|
|
|
|
|