131 lines
4.2 KiB
Groovy
131 lines
4.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version "${springBootVersion}"
|
|
id 'io.spring.dependency-management' version "${springDependencyManagementVersion}"
|
|
}
|
|
|
|
group = "${projectGroup}"
|
|
version = "${projectVersion}"
|
|
|
|
ext {
|
|
LOCAL = 'local'
|
|
DEV = 'dev'
|
|
|
|
if(!project.hasProperty('profile') || !profile) {
|
|
ext.profile = LOCAL;
|
|
}
|
|
|
|
currentProfile = "${profile}"
|
|
println(project.name + "[${profile}]/" + currentProfile + "]" )
|
|
|
|
isLOCAL = currentProfile == LOCAL
|
|
isDEV = currentProfile == DEV
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = "${javaVersion}"
|
|
targetCompatibility = "${javaVersion}"
|
|
}
|
|
|
|
configurations {
|
|
all {
|
|
exclude group: 'commons-logging' , module: 'commons-logging'
|
|
exclude group: 'log4j' , module: 'log4j'
|
|
exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j'
|
|
exclude group: 'org.slf4j' , module: 'slf4j-log4j12'
|
|
}
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDirs = ['src/main/java']
|
|
|
|
if(project.hasProperty( 'profile' )) {
|
|
resources.srcDirs = ['src/main/resources']
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
/** lombok & spring-boot-devtools */
|
|
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
|
|
compileOnly "org.projectlombok:lombok:${lombokVersion}"
|
|
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
|
|
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
|
|
|
|
/** spring boot */
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
|
|
/** spring-boot-starter */
|
|
implementation 'org.springframework.boot:spring-boot-starter-aop'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
implementation 'org.springframework.boot:spring-boot-actuator-autoconfigure'
|
|
/*implementation 'org.springframework.boot:spring-boot-starter-batch'*/
|
|
|
|
|
|
/** spring-boot-starter-security */
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
|
|
/** apache-commons */
|
|
implementation 'commons-beanutils:commons-beanutils:1.9.4'
|
|
implementation 'commons-codec:commons-codec:1.17.1'
|
|
implementation 'commons-io:commons-io:2.17.0'
|
|
implementation 'org.apache.commons:commons-collections4:4.4'
|
|
implementation 'org.apache.commons:commons-lang3:3.17.0'
|
|
implementation 'org.apache.commons:commons-text:1.12.0'
|
|
implementation 'commons-fileupload:commons-fileupload:1.5' // file upload
|
|
|
|
/** log4jdbc */
|
|
implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
|
|
|
|
/** mariaDB */
|
|
implementation "org.mariadb.jdbc:mariadb-java-client:${mariadbClientVersion}"
|
|
|
|
/** mybatis-spring-boot-starter */
|
|
implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisSpringBootVersion}"
|
|
|
|
/** org.json */
|
|
implementation "org.json:json:${jsonVersion}"
|
|
//implementation 'com.fasterxml.jackson.core:jackson-annotations'
|
|
//implementation 'com.fasterxml.jackson.core:jackson-core'
|
|
//implementation 'com.fasterxml.jackson.core:jackson-databind'
|
|
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
|
|
|
|
/** test dependency */
|
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude group : 'org.junit.vintage'
|
|
exclude module : 'junit-vintage-engine'
|
|
//exclude module : 'org.junit.vintage:junit-vintage-engine'
|
|
}
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
|
|
testImplementation 'org.junit.platform:junit-platform-runner:1.11.0'
|
|
testImplementation 'org.springframework.batch:spring-batch-test'
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = "${javaEncoding}"
|
|
}
|
|
tasks.javadoc {
|
|
options.encoding = "${javaEncoding}"
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|