plugins {
    id('java')
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

var lombokVersion = '1.18.24'
dependencies {
    implementation(platform('com.ruoyi.platform:product-platform'))
    compileOnly "org.projectlombok:lombok:${lombokVersion}"
    annotationProcessor "org.projectlombok:lombok:${lombokVersion}"

    testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
    testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
    testImplementation(platform('com.ruoyi.platform:test-platform'))
    testImplementation('org.junit.jupiter:junit-jupiter')
}

repositories {
    mavenLocal()
    // 阿里云镜像
    maven { url = uri("https://maven.aliyun.com/repository/public") }
    maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
    maven { url = uri("https://maven.aliyun.com/repository/spring") }
    maven { url = uri("https://maven.aliyun.com/repository/spring-plugin") }

    maven {
        url = uri('https://repo.maven.apache.org/maven2/')
    }
}

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

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