config : gradle com.ewerk.gradle.plugins.querydsl plugin 제거

Gradle Annotation processor를 사용하도록 설정 변경
dev
minuk926 3 years ago
parent 02948de662
commit 3328bf0214

@ -13,9 +13,6 @@ buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
// JPA querydsl
//classpath("gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10")
}
}
@ -25,14 +22,6 @@ plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'war'
//id 'net.ltgt.apt' version '0.21'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
//id 'org.openapi.generator' version '5.1.1'
// docker : jib
// bootWar --> jibDockerBuild
//id 'com.google.cloud.tools.jib' version '3.1.2' //
}
// buildscript
@ -125,16 +114,18 @@ dependencies {
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
// implementation 'p6spy:p6spy:3.9.1'
// JPA querydsl
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
implementation "com.querydsl:querydsl-core:${queryDslVersion}"
implementation "com.querydsl:querydsl-apt:${queryDslVersion}"
annotationProcessor(
"javax.persistence:javax.persistence-api",
"javax.annotation:javax.annotation-api",
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa")
// JPA mapstruct : lombok - mapstruct
// JPA querydsl ----------------------------------------------
implementation "com.querydsl:querydsl-jpa"
// querydsl JPAAnnotationProcessor
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
// java.lang.NoClassDefFoundError(javax.annotation.Entity)
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
// java.lang.NoClassDefFoundError (javax.annotation.Generated)
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
// ------------------------------------------------------------
// JPA mapstruct -----------------------------------------------------------
// lombok - mapstruct
// target class @Builder + setter Mapper Generation
// @NoArgsConstructor, @Setter
// but, Setter mapstruct @Builder Generation
@ -267,52 +258,12 @@ tasks.withType(JavaCompile) {
//-----------------------------------------------------------------------------------//
// querydsl
//-----------------------------------------------------------------------------------//
def querydslDir = "$buildDir/generated"
// querydsl
sourceSets {
main {
java {
srcDirs = ["$projectDir/src/main/java", querydslDir]
}
}
}
querydsl {
jpa = true
querydslSourcesDir = querydslDir
/** clean 태스크 실행시 QClass 삭제 */
clean {
delete file('src/main/generated') // Annotation processor
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
// build querydsl
compileQuerydsl.doFirst {
if(file(querydslDir).exists())
delete(file(querydslDir))
}
// build querydsl
compileJava {
options.compilerArgs << '-s'
options.compilerArgs << "$buildDir/generated/"
doFirst {
if(file(querydslDir).exists())
delete(file(querydslDir))
file(querydslDir).mkdirs();
}
}
//-----------------------------------------------------------------------------------//
test {
exclude '**/*'
//useJUnitPlatform()

Loading…
Cancel
Save