summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-12-17 00:27:24 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-12-17 00:27:24 +0100
commit121c5692bc67fc9374fb72eccaef15f809b0d4e2 (patch)
treef12eae481dc47b8f4dad66bfc022f1fa7023a734 /build.gradle
parente7fe9057c3e0164db23f98b884e1de092b4aafbb (diff)
downloaddebian-packages-121c5692bc67fc9374fb72eccaef15f809b0d4e2.tar.gz
debian-packages-121c5692bc67fc9374fb72eccaef15f809b0d4e2.zip
add activator task input/output declaration
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle21
1 files changed, 13 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle
index 8087483..2664621 100644
--- a/build.gradle
+++ b/build.gradle
@@ -126,14 +126,12 @@ subprojects {
final activatorExtension = [
env : [:],
bin : [:],
- requirements: []
]
project.extensions.add('activator', activatorExtension)
final activatorTask = task('activator')
+ final activatorDir = new File(project.buildDir, 'activator')
activatorTask.doLast {
- final activatorDir = new File(project.buildDir, 'activator')
-
activatorExtension.bin.each { entry ->
final starter = new File(activatorDir, "bin/${entry.key}")
starter.parentFile.mkdirs()
@@ -142,20 +140,27 @@ subprojects {
it.append "${entry.value} \$*"
}
}
- project.extensions.getByName('ospackage').from(new File(activatorDir, 'bin')) {
- into("/opt/activator/${project.name}/bin")
- fileMode = 0555
- }
-
activatorExtension.env.each { entry ->
final envFile = new File(activatorDir, "env/${entry.key}")
envFile.parentFile.mkdirs()
envFile.write(entry.value as String)
}
+ }
+ project.afterEvaluate {
project.extensions.getByName('ospackage').from(new File(activatorDir, 'env')) {
into("/opt/activator/${project.name}/env")
fileMode = 0444
}
+ activatorExtension.env.each {
+ activatorTask.outputs.file(new File(activatorDir, "env/${it.key}"))
+ }
+ activatorExtension.bin.each {
+ activatorTask.outputs.file(new File(activatorDir, "bin/${it.key}"))
+ }
+ project.extensions.getByName('ospackage').from(new File(activatorDir, 'bin')) {
+ into("/opt/activator/${project.name}/bin")
+ fileMode = 0555
+ }
}
tasks.getByName('buildDeb').dependsOn(activatorTask)