Skip to content

Commit

Permalink
Merge pull request #558 from SWM-NM/feat/#556-1
Browse files Browse the repository at this point in the history
github action queryDSL 빌드 오류 #556
  • Loading branch information
miiiinju1 authored Nov 1, 2023
2 parents 64264bd + 78fff7b commit 10e0d2c
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ buildscript {
ext {
queryDslVersion = "5.0.0"
}
repositories {
mavenCentral()
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.15.RELEASE"
}
}

plugins {
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"

id 'java'
id 'org.springframework.boot' version '2.7.13'
Expand Down Expand Up @@ -37,7 +42,7 @@ dependencies {
// implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'junit:junit:4.13.1'
compile 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
Expand All @@ -49,6 +54,12 @@ dependencies {
"javax.annotation:javax.annotation-api",
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa")

// 스프링 부트 3.0 미만
// implementation "com.querydsl:querydsl-jpa"
// annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa" // querydsl JPAAnnotationProcessor 사용 지정
//
// implementation "com.querydsl:querydsl-core"
// implementation "com.querydsl:querydsl-collections"

//Validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
Expand Down Expand Up @@ -87,28 +98,22 @@ dependencies {

implementation group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
}
def querydslDir = "$buildDir/generated/querydsl"

querydsl {
jpa = true
querydslSourcesDir = querydslDir
}
def querydslDir = "$buildDir/generated/querydsl"

sourceSets {
main.java.srcDir querydslDir
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir)
}

compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
clean.doLast {
file(querydslDir).deleteDir()
}


tasks.named('test') {
useJUnitPlatform()
}

0 comments on commit 10e0d2c

Please sign in to comment.