apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'

version = "$PROCESSOR_VERSION"
archivesBaseName = "$POM_ARTIFACT_ID"

compileKotlin {
    kotlinOptions {
        incremental = true
    }
}

compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
        incremental = true
    }
}

configurations {
    kapt
}

tasks.withType(JavaCompile) {
    options.incremental = true
    options.annotationProcessorPath = configurations.kapt
}

sourceSets {
    main.java.srcDirs {
        "${buildDir.absolutePath}/generated/source/kaptKotlin/"
    }
}

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

dependencies {
    compileOnly project(':annotation')
    implementation 'org.ogce:xpp3:1.1.6'
    implementation 'xmlpull:xmlpull:1.1.3.1'
    implementation 'com.squareup:kotlinpoet:1.12.0'

    def autoServiceVersion = '1.0.1'
    implementation "com.google.auto.service:auto-service:$autoServiceVersion"
    kapt "com.google.auto.service:auto-service:$autoServiceVersion"
}
