plugins {
    id 'io.spring.dependency-management' version '1.1.0'
    id 'java'
}

group = 'org.egovframe.cloud'
version = '1.0.0'
sourceCompatibility = '1.8'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
    maven { url "https://maven.egovframe.go.kr/maven/" } // egovframe maven 원격 저장소
}

ext {
    set('egovframeBootVersion', '4.3.0')
    set('springCloudVersion', '2021.0.9')
    set('log4j2.version', '2.23.1') // log4j 보안 패치
}

dependencies {
//    implementation files('../module-common/build/libs/module-common-4.3.0-plain.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
    implementation 'org.egovframe.cloud:module-common:4.3.0'
    implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.3.0') {
        exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
    }
    implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
    implementation 'org.springframework.boot:spring-boot-starter-webflux'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    implementation 'org.springframework.cloud:spring-cloud-starter-config' // config
    implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // config
    implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'  // bus
    implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
    implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.11'

    implementation 'io.jsonwebtoken:jjwt:0.9.1'

    implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
    implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
    implementation 'net.logstash.logback:logstash-logback-encoder:7.4'        // logstash logback

    implementation 'dev.miku:r2dbc-mysql:0.8.2.RELEASE'
    implementation 'mysql:mysql-connector-java:8.0.33'

    // openapi docs
    implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'

    //messaging
    implementation 'org.springframework.cloud:spring-cloud-stream'
    implementation 'org.springframework.cloud:spring-cloud-stream-binder-rabbit'

    //lombok
    implementation 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.projectlombok:lombok'
    testAnnotationProcessor 'org.projectlombok:lombok'

    testImplementation 'com.h2database:h2'
    testImplementation 'io.r2dbc:r2dbc-h2'

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

	implementation 'org.webjars:webjars-locator-core:0.53'
}

test {
    useJUnitPlatform()
}

dependencyManagement {
    imports {
        mavenBom "org.egovframe.boot:org.egovframe.boot.starter.parent:${egovframeBootVersion}" // egovframe Boot Parent 설정
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}
