Files
common-library/build.gradle

99 lines
3.0 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
}
//버전 변경은 여기서
def commonVer = "beta.1.1.21"
group = 'com.kri.common'
version = commonVer
java {
toolchain { languageVersion = JavaLanguageVersion.of(17) }
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}
dependencies {
// 공통 BOM 객체 하나 잡아두고
def springBootBom = platform('org.springframework.boot:spring-boot-dependencies:3.5.7')
// 여기까지가 BOM 적용 구간
api springBootBom
compileOnly springBootBom
annotationProcessor springBootBom
// ==== 여기부터는 버전 안 써도 됨 (BOM이 버전 정해줌) ====
// JWT
api 'io.jsonwebtoken:jjwt-api:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
// Security Core
api 'org.springframework.security:spring-security-core'
// ✅ HttpSecurity, SecurityFilterChain, WebSecurityCustomizer 등 들어있는 모듈들
compileOnly 'org.springframework.security:spring-security-config'
compileOnly 'org.springframework.security:spring-security-web'
// Swagger / OpenAPI 어노테이션 (@Schema 등) - 컴파일용
compileOnly 'io.swagger.core.v3:swagger-annotations:2.2.25'
compileOnly 'io.swagger.core.v3:swagger-models:2.2.25'
compileOnly 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
// JPA AttributeConverter, Entity 등 인터페이스용
compileOnly "org.springframework.boot:spring-boot-starter-data-jpa"
// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
//Json Util
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
//Excel Util
implementation 'org.apache.poi:poi-ooxml:5.5.1'
// ConfigurationProperties 메타데이터
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// 자동구성/웹/검증/AOP/Redis는 컴파일만 (전이 방지)
compileOnly 'org.springframework.boot:spring-boot-autoconfigure'
compileOnly 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.springframework.boot:spring-boot-starter-aop'
compileOnly 'org.springframework.boot:spring-boot-starter-data-redis'
}
def giteaUser = findProperty("giteaUser") ?: System.getenv("GITEA_USER") ?: ""
def giteaToken = findProperty("giteaToken") ?: System.getenv("GITEA_TOKEN") ?: ""
publishing {
publications {
release(MavenPublication) {
from components.java
groupId = 'com.kri.common'
artifactId = 'starter'
version = commonVer
}
}
repositories {
maven {
name = "gitea"
url = uri("https://gitea.kric.com/api/packages/KRi/maven")
credentials {
username = giteaUser
password = giteaToken
}
}
}
}