apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "org.jetbrains.kotlin.kapt"
apply plugin: "com.vanniktech.maven.publish"

repositories {
    mavenCentral()
}

sourceCompatibility = 17
targetCompatibility = 17

compileKotlin {
    compilerOptions {
        freeCompilerArgs = ['-progressive', '-Xjvm-default=all']
    }
}

jar {
    manifest {
        attributes["Specification-Title"] = project.name
        attributes["Specification-Version"] = project.version
        attributes["Implementation-Title"] = "dev.ahmedmourad.nocopy.nocopy-compiler-plugin"
        attributes["Implementation-Version"] = project.version
    }
}

dependencies {
    compileOnly "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

    api project(":core")

    testImplementation "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
    testImplementation "dev.zacsweers.kctfork:core:0.4.0"
    testImplementation "junit:junit:4.13"
    testImplementation "com.google.truth:truth:1.1.3"
    testImplementation project(":annotations")
}
