Last active
December 26, 2015 02:59
-
-
Save orangeclover/7082694 to your computer and use it in GitHub Desktop.
Gradleでzipファイルをダウンロードする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task downloadZip(type: MyDownload) { | |
| sourceUrl = 'https://dl.dropboxusercontent.com/u/645223/gradle/quickstart.zip' | |
| target = file("${temporaryDir}/quickstart.zip") | |
| } | |
| class MyDownload extends DefaultTask { | |
| @Input | |
| String sourceUrl | |
| @OutputFile | |
| File target | |
| @TaskAction | |
| void download() { | |
| ant.get(src: sourceUrl, dest: target) | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
このコードを書いてるブログはこちら。
http://orangeclover.hatenablog.com/entry/2013/10/21/210057