Skip to content
Permalink
Browse files

Improved: Rewrite ‘installAllPlugins’ in build script (OFBIZ-10695)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854591 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Mar 1, 2019
1 parent f1a1431 commit f712b189bbc1882cdeed88feb7c0c372d7c1ebc0
Showing with 9 additions and 12 deletions.
  1. +7 −12 build.gradle
  2. +2 −0 common.gradle
@@ -906,18 +906,13 @@ task pullAllPluginsSource(group: ofbizPlugin,
dependsOn pullPluginsFromSvn

task installAllPlugins {
file("${pluginsDir}").eachDir { plugin ->
activeComponents().each { component ->
if (component.name == plugin.name) {
if (subprojectExists(":plugins:${plugin.name}")) {
if (taskExistsInproject(":plugins:${plugin.name}", 'install')) {
dependsOn ":plugins:${plugin.name}:install"
doLast { println "installed plugin ${plugin.name}" }
}
}
}
}
}
subdirs(file("${pluginsDir}"))
.filter(this.isComponentEnabled)
.filter { taskExistsInproject(":plugins:${it.name}", 'install') }
.forEach({ plugin ->
dependsOn ":plugins:${plugin.name}:install"
doLast { println "installed plugin ${plugin.name}" }
})
}
doLast {
gradlewSubprocess(['installAllPlugins'])
@@ -54,5 +54,7 @@ List<File> activeComponents() {
}

ext {
subdirs = this.&subdirs
activeComponents = this.&activeComponents.memoize()
isComponentEnabled = this.&isComponentEnabled.memoize()
}

0 comments on commit f712b18

Please sign in to comment.
You can’t perform that action at this time.