diff --git a/build.gradle b/build.gradle index 3c4cd736623a4337e90db7b7d30f031492a4c3b7..bc582b5dbc93e1afa485ef10af3251fb510b1a15 100644 --- a/build.gradle +++ b/build.gradle @@ -53,6 +53,31 @@ apply plugin: 'base' +def download(address,target) { + def file = new FileOutputStream(target) + def out = new BufferedOutputStream(file) + out << new URL(address).openStream() + out.close() +} + + +task downloadCli << { + ['leopard':'macos','linux':'linux','linux64':'linux64','win32':'windows'].each { + n = it.getKey() + dir = 'de.prob.core/prob/' + targetdir = dir+it.getValue() + targetzip = dir+"probcli_${n}.zip" + url = "http://nightly.cobra.cs.uni-duesseldorf.de/cli/probcli_${n}.zip" + download(url,targetzip) + FileTree zip = zipTree(targetzip) + copy { + from zip + into targetdir + } + delete file(targetzip) + } + +} subprojects {