Skip to content

Commit

Permalink
Setting: QueryDSL 세팅 (#66)
Browse files Browse the repository at this point in the history
QueryDSL 종속성 추가
src/main/generated 폴더에 querydsl qentity 생성 지정
querydsl gitignore 추가
 #61
  • Loading branch information
wcorn authored Aug 1, 2024
1 parent 89c4b94 commit 3037f8a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ out/

### Temp Data ###
src/main/resources/data.sql

### Query DSL ###
/src/main/generated/
28 changes: 28 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ java {
}
}

configurations {
querydsl.extendsFrom compileClasspath
}

configurations {
compileOnly {
extendsFrom annotationProcessor
Expand Down Expand Up @@ -55,6 +59,12 @@ dependencies {

implementation platform('software.amazon.awssdk:bom:2.23.7')
implementation 'software.amazon.awssdk:s3'

//querydsl 설정 추가
implementation "com.querydsl:querydsl-jpa:5.0.0:jakarta"
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

dependencyManagement {
Expand All @@ -65,4 +75,22 @@ dependencyManagement {

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

jar {
enabled = false
}

def generated = 'src/main/generated'

sourceSets {
main.java.srcDirs += [generated]
}

tasks.withType(JavaCompile).configureEach {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}

clean.doLast {
file(generated).deleteDir()
}

0 comments on commit 3037f8a

Please sign in to comment.