configurations {
    antContrib
    externalLibs
    deploymentTools
}

dependencies {
    antContrib files('ant/antcontrib.jar')
    externalLibs files('libs/commons-lang.jar', 'libs/log4j.jar')
    deploymentTools fileTree(dir: 'tools', include: '*.exe')
}

task createLibs {
    doLast {
        file('ant').mkdirs()
        file('libs').mkdirs()
        file('tools').mkdirs()
        file('ant/antcontrib.jar').createNewFile()
        file('libs/commons-lang.jar').createNewFile()
        file('libs/log4j.jar').createNewFile()
        file('tools/a.exe').createNewFile()
        file('tools/b.exe').createNewFile()
    }
}

task copyLibs(type: Copy) {
    dependsOn createLibs
    from configurations.antContrib
    from configurations.externalLibs
    from configurations.deploymentTools
    into "$buildDir/libs"
}


