plugins {
    id 'java'
    id 'maven-publish'
}

repositories {
    maven { url 'https://maven.aliyun.com/repository/public/' }
    mavenCentral()
    maven {
        url uri('../../repo')
    }
}
dependencies {
    implementation project(":base")
    implementation project(":zircon")
}
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(11)
    }
}
compileJava {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
    options.fork = true;
    options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-XDignore:symbol.file"


}
task copyJavacClass(type: Copy) {
    from "${buildDir}/classes/java/main/com/sun/tools/javac/comp"
    from "${buildDir}/classes/java/main/com/sun/tools/javac/parser"
    from "${buildDir}/classes/java/main/com/sun/tools/javac/util"
    from "${buildDir}/classes/java/main/com/sun/tools/javac/jvm"
    into "${rootDir}/javac/src/main/resources/clazz/java11"
    rename ~/(.*)\.class/, '$1.clazz'
}
