plugins {
    id 'java'
}

group = 'com.utic.center'
version = '0.0.1'

compileJava.options.encoding = 'UTF-8'

repositories {
    mavenLocal()
    mavenCentral()
    def os = org.gradle.internal.os.OperatingSystem.current()
    if (os.isWindows()) {
        flatDir {
            dirs 'C:/java/repository/'
        }
    } else {
        flatDir {
            dirs '/Users/openvalue/Projects/java/repository/'
        }
    }
}

dependencies {
//    compileOnly 'org.jetbrains:annotations'
//    implementation 'org.fusesource.jansi:jansi:1.18'

    // lombok 라이브러리 추가 시작
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testCompileOnly 'org.projectlombok:lombok'
    testAnnotationProcessor 'org.projectlombok:lombok'
    // lombok 라이브러리 추가 끝

    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-aop'
    implementation 'io.micrometer:micrometer-registry-prometheus'

    implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0'
    implementation 'com.oracle:ojdbc7:12.1.0.2'

    implementation 'com.utic:utic-center-common:0.0.1'

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

    implementation 'org.jetbrains:annotations:24.0.0'  //@NotNull, @Nullable
    implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
}

test {
    useJUnitPlatform()
}

jar {
    enabled = false
}

compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile).configureEach {
    options.compilerArgs << '-Xlint:unchecked'
    options.deprecation = true
    options.encoding = 'UTF-8'
}
