plugins { id 'java' id 'org.springframework.boot' version '3.5.7' id 'io.spring.dependency-management' version '1.1.7' id 'com.diffplug.spotless' version '6.25.0' id 'idea' } group = 'com.kamco.cd' version = '0.0.1-SNAPSHOT' description = 'kamco-dabeeo-training-api' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } configurations { compileOnly { extendsFrom annotationProcessor } } // QueryDSL 생성된 소스 디렉토리 정의 def generatedSourcesDir = file("$buildDir/generated/sources/annotationProcessor/java/main") repositories { mavenCentral() maven { url "https://repo.osgeo.org/repository/release/" } } // Gradle이 생성된 소스를 컴파일 경로에 포함하도록 설정 sourceSets { main { java { srcDirs += generatedSourcesDir } } } 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' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' implementation 'org.springframework.boot:spring-boot-starter-validation' //geometry implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'org.locationtech.jts.io:jts-io-common:1.20.0' implementation 'org.locationtech.jts:jts-core:1.19.0' implementation 'org.hibernate:hibernate-spatial:6.2.7.Final' implementation 'org.geotools:gt-main:30.0' implementation("org.geotools:gt-geotiff:30.0") { exclude group: "javax.media", module: "jai_core" } implementation 'org.geotools:gt-epsg-hsql:30.0' // QueryDSL JPA implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' // Q클래스 생성용 annotationProcessor annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta' annotationProcessor 'jakarta.annotation:jakarta.annotation-api' annotationProcessor 'jakarta.persistence:jakarta.persistence-api' // actuator implementation 'org.springframework.boot:spring-boot-starter-actuator' // Redis : training server는 레이디스 없이 진행합니다. // implementation 'org.springframework.boot:spring-boot-starter-data-redis' // SpringDoc OpenAPI (Swagger) implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0' // Apache Commons Compress for archive handling implementation 'org.apache.commons:commons-compress:1.26.0' // crypto implementation 'org.mindrot:jbcrypt:0.4' // security implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' // JWT (jjwt 0.12.x) : training server는 토큰 DB 인증 방식으로 진행 implementation 'io.jsonwebtoken:jjwt-api:0.12.5' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5' // JSON (Jackson) // Hibernate Types for JSONB support implementation 'io.hypersistence:hypersistence-utils-hibernate-63:3.7.0' implementation 'org.reflections:reflections:0.10.2' implementation 'com.jcraft:jsch:0.1.55' implementation 'org.apache.commons:commons-csv:1.10.0' } // IntelliJ가 생성된 소스를 인식하도록 설정 idea { module { // 소스 디렉토리로 인식 sourceDirs += generatedSourcesDir // Generated Sources Root로 마킹 (IntelliJ에서 특별 처리) generatedSourceDirs += generatedSourcesDir // 소스 및 Javadoc 다운로드 downloadJavadoc = true downloadSources = true } } configurations.configureEach { exclude group: 'javax.media', module: 'jai_core' } tasks.named('test') { useJUnitPlatform() } // 컴파일 전 생성된 소스 디렉토리 생성 보장 tasks.named('compileJava') { doFirst { generatedSourcesDir.mkdirs() } } // 생성된 소스 정리 태스크 tasks.register('cleanGeneratedSources', Delete) { delete generatedSourcesDir } tasks.named('clean') { dependsOn 'cleanGeneratedSources' } bootJar { archiveFileName = 'ROOT.jar' } // Spotless configuration for code formatting (2-space indent) spotless { java { target 'src/**/*.java' googleJavaFormat('1.19.2') // Default Google Style = 2 spaces (NO .aosp()!) trimTrailingWhitespace() endWithNewline() } } // Run spotlessCheck before build tasks.named('build') { dependsOn 'spotlessCheck' }