summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-12-22 16:34:33 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-12-22 16:34:33 +0100
commitb2d145df57a10699b722d8fe84a759e43f0375c7 (patch)
tree403f5465b1ba2403a8bbd5101fd8430faf775c12 /build.gradle
parentc90386a74cf61db6ac95f24743b4fb8d00f881ce (diff)
downloaddebian-packages-b2d145df57a10699b722d8fe84a759e43f0375c7.tar.gz
debian-packages-b2d145df57a10699b722d8fe84a759e43f0375c7.zip
use org.xapek.yvesf : gradle-download-task
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle36
1 files changed, 28 insertions, 8 deletions
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")
+ }
}