From 759aceb4a7bd0185004873f6db1d902fbc1d3fb8 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 19 Dec 2016 21:54:02 +0100 Subject: skip activator task if nothing is configured --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 2664621..beb42c7 100644 --- a/build.gradle +++ b/build.gradle @@ -146,11 +146,16 @@ subprojects { envFile.write(entry.value as String) } } + activatorTask.inputs.property('extension', activatorExtension) + activatorTask.onlyIf { + !(activatorExtension.env.isEmpty() && activatorExtension.bin.isEmpty()) + } 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}")) } -- cgit v1.2.1