Skip to content

Commit

Permalink
[BE] refactor: build.gradle QueryDSL 설정 개선 (#637) (#638)
Browse files Browse the repository at this point in the history
* chore: QueryDSL 설정 수정

- build 폴더에 생성되도록 변경
- 불필요한 설정 제거

* chore: 주석 수정, 메서드 변경
  • Loading branch information
seokjin8678 authored Dec 20, 2023
1 parent 46d1188 commit 98f0f80
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,15 @@ tasks.named('test') {
useJUnitPlatform()
}

// Querydsl 설정부
def generated = 'src/main/generated'
// Querydsl 폴더 지정
def querydslDir = file('build/generated/querydsl')

// querydsl QClass 파일 생성 위치를 지정
tasks.withType(JavaCompile) {
options.getGeneratedSourceOutputDirectory().set(file(generated))
compileJava {
options.getGeneratedSourceOutputDirectory().set(querydslDir)
}

// java source set 에 querydsl QClass 위치 추가
sourceSets {
main.java.srcDirs += [generated]
}

// gradle clean 시에 QClass 디렉토리 삭제
clean {
delete file(generated)
main.java.srcDirs.add(querydslDir)
}

0 comments on commit 98f0f80

Please sign in to comment.