plugins {
    id 'java'
}

group 'info.picocli'
description 'Picocli Annotation Processing Tests - Tests Annotation Processors for picocli Annotations.'
version "$projectVersion"
sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile rootProject
    compile project(':picocli-codegen')
    testCompile "junit:junit:$junitVersion",
            "com.google.testing.compile:compile-testing:$compileTestingVersion",
            "org.apache.logging.log4j:log4j-api:2.13.0",
            "org.apache.logging.log4j:log4j-core:2.13.0"

    if (org.gradle.api.JavaVersion.current().isJava8Compatible() && !org.gradle.api.JavaVersion.current().isJava9Compatible()) {
        // only use tools.jar on Java 8, it was removed in Java 9 // https://github.com/google/compile-testing/issues/134
        testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar()) // needed on Java 8: https://github.com/google/compile-testing/issues/102 (and #28)
    }
}
jar {
    manifest {
        attributes 'Specification-Title': 'Picocli Annotation Processing Tests',
                'Specification-Vendor'  : 'Remko Popma',
                'Specification-Version' : version,
                'Implementation-Title'  : 'Picocli Annotation Processing Tests',
                'Implementation-Vendor' : 'Remko Popma',
                'Implementation-Version': version,
                'Automatic-Module-Name' : 'info.picocli.annotation.processing.tests'
    }
}
