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 { dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion") 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 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java' id 'java'
id 'war' 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 // buildscript
@ -125,16 +114,18 @@ dependencies {
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
// implementation 'p6spy:p6spy:3.9.1' // implementation 'p6spy:p6spy:3.9.1'
// JPA querydsl // JPA querydsl ----------------------------------------------
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}" implementation "com.querydsl:querydsl-jpa"
implementation "com.querydsl:querydsl-core:${queryDslVersion}" // querydsl JPAAnnotationProcessor
implementation "com.querydsl:querydsl-apt:${queryDslVersion}" annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
annotationProcessor( // java.lang.NoClassDefFoundError(javax.annotation.Entity)
"javax.persistence:javax.persistence-api", annotationProcessor "jakarta.persistence:jakarta.persistence-api"
"javax.annotation:javax.annotation-api", // java.lang.NoClassDefFoundError (javax.annotation.Generated)
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa") annotationProcessor "jakarta.annotation:jakarta.annotation-api"
// ------------------------------------------------------------
// JPA mapstruct : lombok - mapstruct
// JPA mapstruct -----------------------------------------------------------
// lombok - mapstruct
// target class @Builder + setter Mapper Generation // target class @Builder + setter Mapper Generation
// @NoArgsConstructor, @Setter // @NoArgsConstructor, @Setter
// but, Setter mapstruct @Builder Generation // but, Setter mapstruct @Builder Generation
@ -267,52 +258,12 @@ tasks.withType(JavaCompile) {
//-----------------------------------------------------------------------------------// //-----------------------------------------------------------------------------------//
// querydsl // querydsl
//-----------------------------------------------------------------------------------// //-----------------------------------------------------------------------------------//
def querydslDir = "$buildDir/generated"
// querydsl
sourceSets {
main {
java {
srcDirs = ["$projectDir/src/main/java", querydslDir]
}
}
}
querydsl { /** clean 태스크 실행시 QClass 삭제 */
jpa = true clean {
querydslSourcesDir = querydslDir 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 { test {
exclude '**/*' exclude '**/*'
//useJUnitPlatform() //useJUnitPlatform()

Loading…
Cancel
Save