Skip to content

Instantly share code, notes, and snippets.

@jyukutyo
Created March 10, 2016 07:26
Show Gist options
  • Save jyukutyo/bd6283b175b82b031aaa to your computer and use it in GitHub Desktop.
Save jyukutyo/bd6283b175b82b031aaa to your computer and use it in GitHub Desktop.
GradleからAnt呼び出し
ant.importBuild "build.xml"
configurations {
antConf
}
repositories {
mavenCentral()
}
dependencies {
antConf 'com.jcraft:jsch:0.1.53'
antConf('org.apache.ant:ant-jsch:1.9.6') {
exclude module: 'org.apache.ant:ant'
}
}
def antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antConf.each { File f ->
antClassLoader.addURL(f.toURI().toURL())
}
task deployWar(dependsOn: packaging) << {
ant.parallel(threadCount: 6) {
ant.project.targets["deployWar"].execute()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment