Skip to content

Commit

Permalink
feat: gradle QueryDSL 추가 (#59) (KAN-110)
Browse files Browse the repository at this point in the history
  • Loading branch information
OziinG committed Nov 1, 2024
1 parent 941ea29 commit c7f5bac
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ Temporary Items

### macOS Patch ###
# iCloud generated files
*.icloud
*.icloud

### QueryDSL ###
/src/*/generated/
28 changes: 27 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,19 @@ dependencies {
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.apis:google-api-services-gmail:v1-rev20220404-2.0.0'
implementation 'javax.mail:mail:1.4.7'

// QueryDSL
def querydslVersion = "5.0.0"
implementation "com.querydsl:querydsl-jpa:${querydslVersion}:jakarta"
annotationProcessor "com.querydsl:querydsl-apt:${querydslVersion}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

spotless {
java {
target('**/*.java')
targetExclude('modules/*/generated/**/*.*')
targetExclude('src/*/generated/**/*.*')
importOrder()
removeUnusedImports()
googleJavaFormat().aosp().formatJavadoc(false)
Expand All @@ -65,6 +72,25 @@ spotless {
}
}

def generated = file("src/main/generated")

clean {
delete generated
}

tasks.withType(JavaCompile) {
options.generatedSourceOutputDirectory = file(generated)
}

// Add generated sources to the main source set
sourceSets {
main {
java {
srcDir generated
}
}
}

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

0 comments on commit c7f5bac

Please sign in to comment.