Skip to content

Commit

Permalink
feat: Support simple and sequence post-processor definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
grv87 committed Feb 13, 2017
1 parent 67c4590 commit 387ef7d
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ class GradlePackerPlugin implements Plugin<Project> {

}
}
if (InputJSON.containsKey('post-processors'))
for (p in InputJSON['post-processors']) {
if (InputJSON.containsKey('post-processors')) {
Closure processPostProcessors = { p ->
processedTasks = [:]
if (p.containsKey('only'))
for (buildName in p['only'])
Expand Down Expand Up @@ -327,7 +327,13 @@ class GradlePackerPlugin implements Plugin<Project> {
}
}
}

for (p in InputJSON['post-processors']) {
if (p instanceof String) continue
if (p instanceof List)
for (p2 in p) processPostProcessors(p2)
else processPostProcessors(p)
}
}
for (t in ts.values()) {
if (t.ext.has('outputFileName')) {
project.logger.info(sprintf('gradle-packer-plugin: task %s has outputFileName %s', [t.name, t.outputFileName]))
Expand Down

0 comments on commit 387ef7d

Please sign in to comment.