Last active
August 29, 2015 14:15
-
-
Save kaeawc/1c2ef8a433b51352fa95 to your computer and use it in GitHub Desktop.
Download a git repository as a Gradle task
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
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath "de.undercouch:gradle-download-task:1.0" | |
} | |
} | |
apply plugin: "download-task" | |
def github(owner, repo, libName, rev, libFolder) { | |
def zipFile = file("${owner}-${repo}-${branch}.zip") | |
download { | |
src "https://github.com/${owner}/${repo}/archive/${branch}.zip" | |
dest zipFile | |
} | |
def librariesFolder = file("./") | |
copy { | |
from zipTree(zipFile) | |
into librariesFolder | |
} | |
delete zipFile | |
} | |
github("kaeawc","that-other-project","master") | |
dependencies { | |
compile project(':that-other-project') | |
compile fileTree(dir: 'libs', include: '*.jar') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment