|
|
|
buildscript {
|
|
|
|
ext {
|
|
|
|
spring = '3.2.2'
|
|
|
|
boot = 'org.springframework.boot'
|
|
|
|
lombok = 'org.projectlombok:lombok'
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath("$boot:spring-boot-gradle-plugin:$spring")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
group = "kr.co.palnet"
|
|
|
|
version = "1.0.0"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
["app", "data", "web", "common"].each {
|
|
|
|
def rootDirName = it;
|
|
|
|
def subProjectDir = new File(projectDir, it)
|
|
|
|
subProjectDir.eachDir { dir ->
|
|
|
|
def projectName = ":${it}:${dir.name}"
|
|
|
|
project(projectName) {
|
|
|
|
|
|
|
|
plugins.apply("java")
|
|
|
|
plugins.apply("java-library")
|
|
|
|
plugins.apply(boot)
|
|
|
|
plugins.apply("io.spring.dependency-management")
|
|
|
|
plugins.apply("idea")
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
developmentOnly
|
|
|
|
runtimeClasspath {
|
|
|
|
extendsFrom developmentOnly
|
|
|
|
}
|
|
|
|
compileOnly {
|
|
|
|
extendsFrom annotationProcessor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
developmentOnly("$boot:spring-boot-devtools")
|
|
|
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.15.3'
|
|
|
|
|
|
|
|
compileOnly lombok
|
|
|
|
testCompileOnly lombok
|
|
|
|
annotationProcessor lombok
|
|
|
|
testAnnotationProcessor lombok
|
|
|
|
|
|
|
|
testImplementation "$boot:spring-boot-starter-test"
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rootDirName == 'app') {
|
|
|
|
bootJar.enabled(true)
|
|
|
|
jar.enabled(false)
|
|
|
|
} else {
|
|
|
|
bootJar.enabled(false)
|
|
|
|
jar.enabled(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
help.enabled(false)
|