plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.0'
    id 'io.spring.dependency-management' version '1.1.4'
}
// 루트 프로젝트에서는 bootJar 태스크 비활성화
bootJar {
    enabled = false
}

allprojects {
    group = 'com.won.smarketing'
    version = '1.0.0'

    repositories {
        mavenCentral()
    }
}

subprojects {
    apply plugin: 'java'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'

    configurations {
        compileOnly {
            extendsFrom annotationProcessor
        }
    }

    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.springframework.boot:spring-boot-starter-webflux'
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        implementation 'org.springframework.boot:spring-boot-starter-security'
        implementation 'org.springframework.boot:spring-boot-starter-validation'
        implementation 'org.springframework.boot:spring-boot-starter-data-redis'
        implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
        implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
        implementation 'io.jsonwebtoken:jjwt-impl:0.12.3'
        implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3'
        compileOnly 'org.projectlombok:lombok'
        annotationProcessor 'org.projectlombok:lombok'

        // PostgreSQL (운영용)
        runtimeOnly 'org.postgresql:postgresql:42.7.1'

        testImplementation 'org.springframework.boot:spring-boot-starter-test'
        testImplementation 'org.springframework.security:spring-security-test'

        implementation 'com.azure:azure-messaging-eventhubs:5.18.0'
        implementation 'com.azure:azure-messaging-eventhubs-checkpointstore-blob:1.19.0'
        implementation 'com.azure:azure-identity:1.11.4'
    }

    tasks.named('test') {
        useJUnitPlatform()
    }
}