Skip to content

Commit

Permalink
#78 [feat] QueryDsl Q도메인 중복생성 에러를 수정한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
juuuunny committed Nov 26, 2024
1 parent a418d2f commit dd8e169
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,20 @@ java {
}
}

tasks.named('compileJava', JavaCompile).configure {
options.annotationProcessorGeneratedSourcesDirectory = file("$build/generated/sources/annotationProcessor/java/main")
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += [
"-s", layout.buildDirectory.dir("generated/sources/annotationProcessor/java/main").get().asFile.absolutePath
]
}

sourceSets {
main {
java {
srcDirs += "$build/generated/sources/annotationProcessor/java/main"
srcDirs += layout.buildDirectory.dir("generated/sources/annotationProcessor/java/main").get().asFile
}
}
}

tasks.named('compileJava') {
doFirst {
// QClass 파일 자동 삭제
def querydslGeneratedDir = layout.buildDirectory.dir("generated/sources/annotationProcessor/java/main").get().asFile
if (querydslGeneratedDir.exists()) {
querydslGeneratedDir.deleteDir()
}
}
}
ext {
snippetsDir = file('build/generated-snippets')
}
Expand Down Expand Up @@ -161,4 +154,4 @@ tasks.register('copyDocument', Copy) {

tasks.named("build") {
dependsOn copyDocument
}
}

0 comments on commit dd8e169

Please sign in to comment.