plugins {
    id 'java-library'
}

sourceCompatibility = 11
targetCompatibility = 11

repositories {
    mavenCentral()
}

dependencies {
    implementation project(':app:cli-ac')
    implementation project(':lib:ac-api')
    compileOnly "org.apache.ant:ant:$antVersion"
}

jar {
    archiveBaseName = 'AppleCommander'
    archiveAppendix = 'ant'

    dependsOn configurations.runtimeClasspath
    from {
        configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
    }
}

// Automagically run the Ant tests as part of the build process.
ant.importBuild('src/test/resources/build-testacant.xml') { antTargetName ->
    'anttest-' + antTargetName
}
tasks.named('test') {
    finalizedBy('anttest-all')
}
