티스토리 뷰
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
// QueryDSL Version
def queryDSLVersion = '4.2.2'
// QueryDSL PATH
def generated = "src/main/generated"
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.6.1'
compileOnly 'org.projectlombok:lombok'
// QueryDSL - DSL(Domain Specific Language)
compile("com.querydsl:querydsl-core:${queryDSLVersion}")
compile("com.querydsl:querydsl-jpa:${queryDSLVersion}")
compile("com.querydsl:querydsl-apt:${queryDSLVersion}")
annotationProcessor(
"com.querydsl:querydsl-apt:${queryDSLVersion}:jpa",
"org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final",
"javax.annotation:javax.annotation-api",
"org.projectlombok:lombok"
)
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
sourceSets {
main.java.srcDirs += [ generated ]
}
tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(generated)
}
clean.doLast {
file(generated).deleteDir()
}
test {
useJUnitPlatform()
}
관련 링크
'개발자의 삶 > 패키지 관리 및 빌드 도구(NPM, Gradle, Maven, ...)' 카테고리의 다른 글
[Gradle] Maven to Gradle, 메이븐에서 그래들 전환(변환) (0) | 2020.03.10 |
---|