buildscript {
dependencies {
classpath("gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10")
}
}
implementation 'com.querydsl:querydsl-jpa'
implementation 'com.querydsl:querydsl-apt'
+plugins 아래에
apply 추가
apply plugin: "com.ewerk.gradle.plugins.querydsl"
//querydsl 추가
def querydslDir = 'src/main/generated'
//def querydslDir = "$buildDir/generated/querydsl"
querydsl {
library = "com.querydsl:querydsl-apt"
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', querydslDir]
}
}
}
compileQuerydsl{
options.annotationProcessorPath = configurations.querydsl
}
configurations {
querydsl.extendsFrom compileClasspath
}