You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
4.2 KiB
Groovy
126 lines
4.2 KiB
Groovy
2 years ago
|
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'
|
||
|
|
||
|
/*====================================================================================
|
||
|
* jdbc library
|
||
|
====================================================================================*/
|
||
|
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.5'
|
||
|
implementation 'mysql:mysql-connector-java:8.0.30'
|
||
|
//TODO: "java.sql.SQLException: 지원되지 않는 문자 집합(클래스 경로에 orai18n.jar 추가): KO16MSWIN949" 에러 발생 시 추가
|
||
|
implementation 'com.oracle.ojdbc:orai18n:19.3.0.0'
|
||
|
|
||
|
|
||
|
/*====================================================================================
|
||
|
* 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'))
|
||
|
}
|
||
|
|
||
|
|