mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 21:26:24 +00:00
125 lines
3.6 KiB
Groovy
125 lines
3.6 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.3.0' apply false
|
|
id 'io.spring.dependency-management' version '1.1.6' apply false
|
|
id 'io.freefair.lombok' version '8.10' apply false
|
|
}
|
|
|
|
group = 'com.kt.event'
|
|
version = '1.0.0'
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'io.freefair.lombok'
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
// Common versions for all subprojects
|
|
ext {
|
|
jjwtVersion = '0.12.5'
|
|
springdocVersion = '2.5.0'
|
|
mapstructVersion = '1.5.5.Final'
|
|
commonsLang3Version = '3.14.0'
|
|
commonsIoVersion = '2.16.1'
|
|
hypersistenceVersion = '3.7.3'
|
|
openaiVersion = '0.18.2'
|
|
feignJacksonVersion = '13.1'
|
|
resilience4jVersion = '2.2.0'
|
|
azureStorageVersion = '12.25.0'
|
|
}
|
|
}
|
|
|
|
// Configure all subprojects with Spring dependency management
|
|
subprojects {
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.2"
|
|
}
|
|
}
|
|
}
|
|
|
|
// Configure only service modules (exclude common)
|
|
configure(subprojects.findAll { it.name != 'common' }) {
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
dependencies {
|
|
// Common module dependency
|
|
implementation project(':common')
|
|
|
|
// Spring Boot Starters
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
// Actuator for health checks and monitoring
|
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
|
|
|
// Kafka
|
|
implementation 'org.springframework.kafka:spring-kafka'
|
|
|
|
// API Documentation (common across all services)
|
|
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocVersion}"
|
|
|
|
// Database
|
|
runtimeOnly 'org.postgresql:postgresql'
|
|
|
|
// Testing
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
testImplementation 'org.springframework.kafka:spring-kafka-test'
|
|
testImplementation 'org.mockito:mockito-junit-jupiter'
|
|
|
|
// Configuration Processor
|
|
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
|
}
|
|
|
|
// Configure bootJar task for each service
|
|
bootJar {
|
|
archiveFileName = "${project.name}.jar"
|
|
}
|
|
}
|
|
|
|
// Java version consistency check for all modules
|
|
tasks.register('checkJavaVersion') {
|
|
doLast {
|
|
println "Java Version: ${System.getProperty('java.version')}"
|
|
println "Java Home: ${System.getProperty('java.home')}"
|
|
}
|
|
}
|
|
|
|
// Clean task for all subprojects
|
|
tasks.register('cleanAll') {
|
|
dependsOn subprojects.collect { it.tasks.named('clean') }
|
|
description = 'Clean all subprojects'
|
|
}
|
|
|
|
// Build task for all subprojects
|
|
tasks.register('buildAll') {
|
|
dependsOn subprojects.collect { it.tasks.named('build') }
|
|
description = 'Build all subprojects'
|
|
}
|