Skip to content

Commit

Permalink
Merge pull request #52 from Team-UMC/fix/#51/querydsl
Browse files Browse the repository at this point in the history
[FIX] querydsl build ์„ค์ • ์ˆ˜์ •
  • Loading branch information
kyxxgsoo authored Jan 31, 2024
2 parents fe2c861 + 11f44cd commit 8ff84f4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ application.yml
### Ignore checksum files ###
checksums.lock
md-checksums.bin
*.lock
*.lock

### Qclass ###
**/generated
29 changes: 11 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
// queryDsl Settings
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}

group = 'com.umc'
Expand Down Expand Up @@ -70,29 +68,24 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'
}

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

//querydsl ๋นŒ๋“œ ์˜ต์…˜
def querydslDir = "$buildDir/generated/querydsl"
// Querydsl
def generated = 'src/main/generated'

querydsl {
jpa = true
querydslSourcesDir = querydslDir
//QClass ํŒŒ์ผ ์œ„์น˜
tasks.withType(JavaCompile) {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}

//java source set ์— querydsl QClass ์œ„์น˜ ์ถ”๊ฐ€
sourceSets {
main.java.srcDir querydslDir
main.java.srcDirs += [ generated ]
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}

compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
//clean ์‹œ generated ํŒŒ์ผ ์‚ญ์ œ
clean {
delete file(generated)
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void inquiryMyInviteCode() throws Exception {
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value("COMMON200"))
.andExpect(jsonPath("$.message").value("์š”์ฒญ์— ์„ฑ๊ณตํ•˜์˜€์Šต๋‹ˆ๋‹ค."))
.andExpect(jsonPath("$.result").value(hasSize(response.getInvites().size())));
.andExpect(jsonPath("$.result").exists());
}

@DisplayName("์ดˆ๋Œ€ ์ฝ”๋“œ ์ธ์ฆ API ํ…Œ์ŠคํŠธ")
Expand Down

0 comments on commit 8ff84f4

Please sign in to comment.