From 7ab83d5425950a45e1fc19a7159f2544cdf07706 Mon Sep 17 00:00:00 2001 From: chaeeun-Han Date: Mon, 27 Nov 2023 02:13:02 +0900 Subject: [PATCH] chore: Add QueryDSL (#2) Co-authored-by: hyojeongchoi Co-authored-by: nusuy Co-authored-by: Queue-ri --- backend/build.gradle | 75 +++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 9180c5b..8b5502a 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -1,52 +1,69 @@ plugins { - id 'java' - id 'org.springframework.boot' version '2.7.12' - id 'io.spring.dependency-management' version '1.0.15.RELEASE' + id 'java' + id 'org.springframework.boot' version '2.7.12' + id 'io.spring.dependency-management' version '1.0.15.RELEASE' } group = 'com.hamahama' -version = '1.0.0' +version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { - compileOnly { - extendsFrom annotationProcessor - } + compileOnly { + extendsFrom annotationProcessor + } } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-web' - compileOnly 'org.projectlombok:lombok' - runtimeOnly 'org.postgresql:postgresql' - annotationProcessor 'org.projectlombok:lombok' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - // PostgreSQL + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' + runtimeOnly 'org.postgresql:postgresql' + annotationProcessor 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + + // PostgreSQL implementation group: 'org.postgresql', name:'postgresql', version: '42.6.0' - // Hibernate Type Support - implementation 'io.hypersistence:hypersistence-utils-hibernate-55:3.4.3' + // Hibernate Type Support + implementation 'io.hypersistence:hypersistence-utils-hibernate-55:3.4.3' - // ChatGPT - implementation 'io.github.flashvayne:chatgpt-spring-boot-starter:1.0.4' + // ChatGPT + implementation 'io.github.flashvayne:chatgpt-spring-boot-starter:1.0.4' - // AWS SDK + // AWS SDK implementation ("org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE") - // JWT - implementation 'io.jsonwebtoken:jjwt:0.9.1' + // JWT + implementation 'io.jsonwebtoken:jjwt:0.9.1' + + // mail + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '2.6.3' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' - // mail - implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '2.6.3' - implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' - implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' + // QueryDSL + implementation 'com.querydsl:querydsl-jpa:5.0.0' + annotationProcessor( + "javax.persistence:javax.persistence-api", + "javax.annotation:javax.annotation-api", + "com.querydsl:querydsl-apt:5.0.0:jpa" + ) } -tasks.named('test') { - useJUnitPlatform() +// QueryDSL +sourceSets { + main { + java { + srcDirs = ["$projectDir/src/main/java", "$projectDir/build/generated"] + } + } } + +tasks.named('test') { + useJUnitPlatform() +} \ No newline at end of file