Skip to content

Instantly share code, notes, and snippets.

@kyonmm
Created June 20, 2011 07:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyonmm/1035262 to your computer and use it in GitHub Desktop.
Save kyonmm/1035262 to your computer and use it in GitHub Desktop.
Antのオプショナルタスク実行
defaultTasks 'ftp'
repositories{
flatDir(dirs:["lib"])
}
configurations {
ftpAntTask
}
dependencies {
ftpAntTask "org.apache.ant:ant-commons-net:1.8.2", "commons-net:commons-net:1.4.1"
}
task ftp << {
ant {
taskdef(name: 'ftp',classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',classpath: configurations.ftpAntTask.asPath)
ftp(server: "remoteHost", userid: "id", password: "pass", remotedir:"/opt/bar") {
fileset(dir: "build")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment