From a40fff83c919fe9a4ac0ba815cb338cc0a8d765a Mon Sep 17 00:00:00 2001 From: Philip Crotwell Date: Tue, 24 Oct 2017 12:44:45 -0400 Subject: [PATCH] wrap checking for mac in project.afterEvaluate --- .../edu/sc/seis/macAppBundle/MacAppBundlePlugin.groovy | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/groovy/edu/sc/seis/macAppBundle/MacAppBundlePlugin.groovy b/src/main/groovy/edu/sc/seis/macAppBundle/MacAppBundlePlugin.groovy index 042bb45..805aea8 100644 --- a/src/main/groovy/edu/sc/seis/macAppBundle/MacAppBundlePlugin.groovy +++ b/src/main/groovy/edu/sc/seis/macAppBundle/MacAppBundlePlugin.groovy @@ -82,10 +82,12 @@ class MacAppBundlePlugin implements Plugin { zipTask.dependsOn(createAppTask) zipTask.mustRunAfter codeSignTask zipTask.mustRunAfter setFileTask - if (Os.isFamily(Os.FAMILY_MAC)) { - project.getTasksByName("assemble", true).each{ t -> t.dependsOn(dmgTask) } - } else { - project.getTasksByName("assemble", true).each{ t -> t.dependsOn(zipTask) } + project.afterEvaluate{ + if (Os.isFamily(Os.FAMILY_MAC)) { + project.getTasksByName("assemble", true).each{ t -> t.dependsOn(dmgTask) } + } else { + project.getTasksByName("assemble", true).each{ t -> t.dependsOn(zipTask) } + } } }