Skip to content

Commit

Permalink
wrap checking for mac in project.afterEvaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
crotwell committed Oct 24, 2017
1 parent 6dc8939 commit a40fff8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ class MacAppBundlePlugin implements Plugin<Project> {
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) }
}
}
}

Expand Down

0 comments on commit a40fff8

Please sign in to comment.