Files
myListBridgeAPI/build.gradle
2025-11-26 14:09:47 +09:00

155 lines
4.7 KiB
Groovy

plugins {
id 'java'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.0'
id 'org.sonarqube' version '4.0.0.2929'
}
group = 'com.mylistbridge.api'
version = '1.0.0'
/*ava 17 버전과 호환*/
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.2'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-aop'
// JPA
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.1'
implementation 'org.apache.httpcomponents.core5:httpcore5:5.3.1'
//Json
implementation group: 'org.json', name: 'json', version: '20231013'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
//aws
implementation platform('software.amazon.awssdk:bom:2.20.155')
implementation 'software.amazon.awssdk:dynamodb'
implementation 'software.amazon.awssdk:dynamodb-enhanced'
implementation 'software.amazon.awssdk:s3:2.21.5'
implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:cloudwatch'
//메일 서버
implementation 'org.springframework.boot:spring-boot-starter-mail'
//mongoDB
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
//POI
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
//spring batch
implementation 'org.springframework.boot:spring-boot-starter-batch'
// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
//swagger
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.1.0'
// RabbitMQ
implementation 'com.rabbitmq:amqp-client:5.21.0'
// proto
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.21.12'
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.25.3'
//redis
implementation 'redis.clients:jedis:4.3.1'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// Playwright (브라우저 자동화)
implementation 'com.microsoft.playwright:playwright:1.41.0'
compileOnly 'org.projectlombok:lombok'
// PostgreSQL
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
sonarqube {
properties {
property "sonar.projectKey", "admintool"
property "sonar.host.url", "http://localhost:9000"
property "sonar.token", "sqp_097d54f557bc6f85200f6340bbf86906a00ac38c"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.exclusions", "**/build/**, **/src/main/java/com/caliverse/admin/domain/RabbitMq/**, **/logs/**, **/.gradle/**, **/bin/**, **/.idea/**"
}
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.named('jar'){
enabled=false
}
tasks {
processResources {
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.INCLUDE
}
}
def getDate() {
new Date().format('yyyyMMdd')
}
// 빌드 종류별 처리
def profiles = project.hasProperty('profile') ? project.property('profile') : 'local'
println "Active profile: $profiles"
tasks.withType(JavaExec) {
systemProperty 'spring.profiles.active', profiles
}
bootJar{
archivesBaseName = 'MyListBridgeAPI'
archiveVersion = '1.0.0'
// archiveFileName = "MyListBridgeAPI-${version}-${profile}.jar"
archiveFileName = "MyListBridgeAPI-${profiles}.jar"
}
sourceSets {
/**
* 개발환경 : local
* 운영환경 : live
* 환경 변경하여 빌드시 ext.profile 값 변경
*/
// def Properties properties = new Properties()
// Reader reader = new FileReader(project.rootProject.file('src/main/resources/config/application.yml'))
// properties.load(reader)
// ext.profile = properties.getProperty('active')
println "Active resources set src/main/resources/config/${profiles}"
main {
java {
srcDirs "src/main/java"
}
resources {
srcDirs "src/main/resources/config","src/main/resources/config/${profiles}"
}
}
}