Skip to content

Commit

Permalink
[#54] refactor: QueryDSL 플러그인 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
kwj1270 committed Nov 20, 2021
1 parent 201ffec commit 156eddc
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'org.springframework.boot' version '2.5.3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "org.asciidoctor.convert" version "1.5.9.2"
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
id 'java'
id 'jacoco'
}
Expand All @@ -25,9 +24,15 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'

// query dsl
implementation 'com.querydsl:querydsl-core'
implementation 'com.querydsl:querydsl-jpa'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.8'

// querydsl JPAAnnotationProcessor 사용 지정
annotationProcessor("com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa") // querydsl JPAAnnotationProcessor 사용 지정
annotationProcessor "jakarta.persistence:jakarta.persistence-api:2.2.3"
annotationProcessor "jakarta.annotation:jakarta.annotation-api:1.3.5"

// database
runtimeOnly 'com.h2database:h2'

Expand All @@ -47,19 +52,18 @@ dependencies {

apply from: 'jacoco.gradle'

// querydsl 적용
def querydslDir = "$buildDir/generated/querydsl"
querydsl {
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets {
main.java.srcDir querydslDir
}
configurations {
querydsl.extendsFrom compileClasspath

tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir)
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl

clean.doLast {
file(querydslDir).deleteDir()
}

ext {
Expand Down

0 comments on commit 156eddc

Please sign in to comment.