From b2d145df57a10699b722d8fe84a759e43f0375c7 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Tue, 22 Dec 2015 16:34:33 +0100 Subject: use org.xapek.yvesf : gradle-download-task --- build.gradle | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 816e98a..a57e331 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,13 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath 'org.xapek.yvesf:gradle-download-task:0.1-SNAPSHOT' + } +} + plugins { id "nebula.ospackage" version "3.2.0" } @@ -12,25 +22,26 @@ ext { } allprojects { - configurations { sshAntTask } + configurations { + sshAntTask + } repositories { + mavenLocal() mavenCentral() } - dependencies { sshAntTask 'org.apache.ant:ant-jsch:1.9.2' } + dependencies { + sshAntTask 'org.apache.ant:ant-jsch:1.9.2' + } +} - ant.taskdef( - name: 'scp', - classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', - classpath: configurations.sshAntTask.asPath) +task rebuildRepositoryIndex() << { ant.taskdef( name: 'ssh', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.SSHExec', classpath: configurations.sshAntTask.asPath) -} -task rebuildRepositoryIndex() << { ant.ssh(host: sshHost, username: sshUser, keyfile: file(sshKeyfile), @@ -47,6 +58,11 @@ subprojects { def buildDeb = project.getTasks().getByName('buildDeb') task upload() << { + ant.taskdef( + name: 'scp', + classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', + classpath: configurations.sshAntTask.asPath) + ant.scp(file: new File(project.buildDir, "distributions/${buildDeb.assembleArchiveName()}"), todir: "${sshUser}@${sshHost}:${sshTargetDir}", keyfile: file(sshKeyfile), @@ -54,4 +70,8 @@ subprojects { verbose: true) } upload.dependsOn(buildDeb) + + ospackage { + release new Date().format("yMd-hms") + } } -- cgit v1.2.1