Skip to content

Commit

Permalink
#78 [feat] QueryDsl 관련 build.gradle 설정 파일을 복구한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
juuuunny committed Nov 26, 2024
1 parent dd8e169 commit 36cab55
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,27 @@ java {
}
}

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

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

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

0 comments on commit 36cab55

Please sign in to comment.