forked from moqui/moqui-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
420 lines (383 loc) · 23.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
/*
* This software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software (see the LICENSE.md file). If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
buildscript {
repositories { jcenter() }
dependencies { classpath 'org.ajoberstar:gradle-git:1.3.2' }
}
// Not needed for explicit use, causes problems when not from git repo: plugins { id 'org.ajoberstar.grgit' version '1.3.2' }
import org.ajoberstar.grgit.*
allprojects { version = '2.0.0' }
defaultTasks 'build'
def tomcatHome = '../apache-tomcat-8.0.21'
def warName = 'moqui-' + version + '.war'
def plusRuntimeName = 'moqui-plus-runtime.war'
def execTempDir = 'execwartmp'
def moquiRuntime = 'runtime'
def moquiConfDev = 'conf/MoquiDevConf.xml'
def moquiConfProduction = 'conf/MoquiProductionConf.xml'
def allCleanTasks = getTasksByName('clean', true)
def allBuildTasks = getTasksByName('build', true)
def allTestTasks = getTasksByName('test', true)
def getComponentTestTasks() {
Set<Task> testTasks = new LinkedHashSet()
for (Project subProject in getSubprojects()) if (subProject.getName().startsWith('runtime/component'))
testTasks.addAll(subProject.getTasksByName('test', false))
return testTasks
}
// ========== clean tasks ==========
task clean(type: Delete) { delete file(warName); delete file(execTempDir) }
task cleanTempDir(type: Delete) { delete file(execTempDir) }
task cleanDb << { if (!file(moquiRuntime).exists()) return; delete files(file(moquiRuntime+'/db/derby').listFiles()) - files(moquiRuntime+'/db/derby/derby.properties'); delete file(moquiRuntime+'/db/h2') }
task cleanOrientDb(type: Delete) { delete file(moquiRuntime+'/db/orientdb/databases') }
task cleanElasticSearch(type: Delete) { delete file(moquiRuntime+'/elasticsearch/data') }
task cleanLog(type: Delete) { delete fileTree(dir: moquiRuntime+'/log', include: '*') }
task cleanTxLog(type: Delete) { delete fileTree(dir: moquiRuntime+'/txlog', include: '*') }
task cleanLoadSave(type: Delete) { delete file('SaveH2.zip'); delete file('SaveDEFAULT.zip'); delete file('SaveTenant.zip');
delete file('SaveTransactional.zip'); delete file('SaveAnalytical.zip'); delete file('SaveOrientDb.zip'); delete file('SaveElasticSearch.zip') }
task cleanPlusRuntime(type: Delete) { delete file(plusRuntimeName) }
task cleanOther(type: Delete) { delete fileTree(dir: '.', includes: ['**/.nbattrs', '**/*~', '**/.#*', '**/.DS_Store', '**/*.rej', '**/*.orig']) }
task cleanAll { dependsOn clean, allCleanTasks, cleanDb, cleanOrientDb, cleanElasticSearch, cleanTxLog, cleanLog,
cleanLoadSave, cleanPlusRuntime, cleanOther }
// ========== check/update tasks ==========
def checkRuntimeDirAndDefaults(String locType) {
Node addons = parseAddons()
Node myaddons = parseMyaddons()
if (!locType) locType = file('.git').exists() ? 'git' : 'current'
File runtimeDir = file('runtime')
if (!runtimeDir.exists()) {
Node runtimeNode = myaddons != null && myaddons.runtime ? (Node) myaddons.runtime[0] : null
if (runtimeNode == null) runtimeNode = addons != null && addons.runtime ? (Node) addons.runtime[0] : null
if (runtimeNode == null) throw new InvalidUserDataException("The runtime directory does not exist and no runtime element found in myaddons.xml or addons.xml")
downloadComponent("runtime", locType, runtimeNode, addons, myaddons)
}
// look for @default in myaddons.xml only
if (myaddons?.'@default') {
String defaultComps = myaddons.'@default'
Set compsChecked = new TreeSet()
Set defaultCompsDownloaded = new TreeSet()
for (String compName in defaultComps.split(',')) {
compName = compName.trim()
if (!compName) continue
File componentDir = file("runtime/component/${compName}")
if (componentDir.exists()) continue
getComponent(compName, locType, addons, myaddons, compsChecked)
defaultCompsDownloaded.add(compName)
}
if (defaultCompsDownloaded)
logger.lifecycle("Got default components ${defaultCompsDownloaded}, dependent components checked: ${compsChecked}")
}
}
task getRuntime {
description "If the runtime directory does not exist get it using settings in myaddons.xml or addons.xml; also check default components in myaddons.xml (addons.@default) and download any missing"
doLast { checkRuntimeDirAndDefaults(project.hasProperty('locationType') ? locationType : null) }
}
task gitPullAll {
description "Do a git pull to update moqui, runtime, and each installed component (for each where a .git directory is found)"
doLast {
// framework and runtime
if (file(".git").exists()) { logger.lifecycle("\nPulling moqui"); Grgit.open(dir: '.').pull() }
if (file("runtime/.git").exists()) { logger.lifecycle("\nPulling runtime"); Grgit.open(dir: 'runtime').pull() }
// all directories under runtime/component
for (File compDir in file('runtime/component').listFiles().findAll { it.isDirectory() && it.listFiles().find { it.name == '.git' } }) {
logger.lifecycle("\nPulling ${compDir.path}")
Grgit.open(dir: compDir.path).pull()
}
}
}
task gitStatusAll {
description "Do a git status to check moqui, runtime, and each installed component (for each where a .git directory is found)"
doLast {
List<String> gitDirectories = []
if (file(".git").exists()) gitDirectories.add(file('.').path)
if (file("runtime/.git").exists()) gitDirectories.add(file('runtime').path)
for (File compDir in file('runtime/component').listFiles().findAll { it.isDirectory() && it.listFiles().find { it.name == '.git' } })
gitDirectories.add(compDir.path)
for (String gitDir in gitDirectories) {
logger.lifecycle("\nGit status for ${gitDir}")
def curGrgit = Grgit.open(dir: gitDir)
if (curGrgit.remote.list().find({ it.name == 'upstream'})) {
def upstreamAhead = curGrgit.log { range curGrgit.resolve.toCommit('refs/remotes/upstream/master'), curGrgit.resolve.toCommit('refs/remotes/origin/master') }
if (upstreamAhead) logger.lifecycle("- origin/master ${upstreamAhead.size()} commits ahead of upstream/master")
}
def unpushed = curGrgit.log { range curGrgit.resolve.toCommit('refs/remotes/origin/master'), curGrgit.resolve.toCommit('HEAD') }
if (unpushed) logger.lifecycle("--- ${unpushed.size()} commits unpushed (ahead of origin/master)")
for (Commit commit in unpushed) logger.lifecycle(" - ${commit.getAbbreviatedId(8)} - ${commit.shortMessage}")
def curStatus = curGrgit.status()
if (curStatus.isClean()) logger.lifecycle("* nothing to commit, working directory clean")
if (curStatus.staged.added || curStatus.staged.modified || curStatus.staged.removed) logger.lifecycle("--- Changes to be committed::")
for (String fn in curStatus.staged.added) logger.lifecycle(" added: ${fn}")
for (String fn in curStatus.staged.modified) logger.lifecycle(" modified: ${fn}")
for (String fn in curStatus.staged.removed) logger.lifecycle(" removed: ${fn}")
if (curStatus.unstaged.added || curStatus.unstaged.modified || curStatus.unstaged.removed) logger.lifecycle("--- Changes not staged for commit:")
for (String fn in curStatus.unstaged.added) logger.lifecycle(" added: ${fn}")
for (String fn in curStatus.unstaged.modified) logger.lifecycle(" modified: ${fn}")
for (String fn in curStatus.unstaged.removed) logger.lifecycle(" removed: ${fn}")
}
}
}
task gitUpstreamAll {
description "Do a git pull upstream:master for moqui, runtime, and each installed component (for each where a .git directory is found and has a remote called upstream)"
doLast {
String remoteName = project.hasProperty('remote') ? remote : 'upstream'
List<String> gitDirectories = []
if (file(".git").exists()) gitDirectories.add(file('.').path)
if (file("runtime/.git").exists()) gitDirectories.add(file('runtime').path)
for (File compDir in file('runtime/component').listFiles().findAll { it.isDirectory() && it.listFiles().find { it.name == '.git' } })
gitDirectories.add(compDir.path)
for (String gitDir in gitDirectories) {
def curGrgit = Grgit.open(dir: gitDir)
if (curGrgit.remote.list().find({ it.name == remoteName})) {
logger.lifecycle("\nGit merge ${remoteName} for ${gitDir}")
curGrgit.pull(remote: remoteName, branch: 'master')
} else {
logger.lifecycle("\nNo ${remoteName} remote for ${gitDir}")
}
}
}
}
// ========== run tasks ==========
task run(type: JavaExec) {
dependsOn getRuntime, allBuildTasks, cleanTempDir
workingDir = '.'; jvmArgs = ['-server', '-XX:MaxPermSize=192m', '-XX:-OmitStackTraceInFastThrow']; maxHeapSize = '512M'
systemProperties = ['moqui.conf':moquiConfDev, 'moqui.runtime':moquiRuntime]
// NOTE: this is a hack, using -jar instead of a class name, and then the first argument is the name of the jar file
main = '-jar'; args = [warName]
}
task runStaging(type: JavaExec) {
dependsOn getRuntime, allBuildTasks, cleanTempDir
workingDir = '.'; jvmArgs = ['-server', '-XX:MaxPermSize=192m', '-Xms512M']; maxHeapSize = '512M'
systemProperties = ['moqui.conf':'conf/MoquiStagingConf.xml', 'moqui.runtime':moquiRuntime]
main = '-jar'; args = [warName]
}
task runProduction(type: JavaExec) {
dependsOn getRuntime, allBuildTasks, cleanTempDir
workingDir = '.'; jvmArgs = ['-server', '-XX:MaxPermSize=192m', '-Xms1024M']; maxHeapSize = '1024M'
systemProperties = ['moqui.conf':moquiConfProduction, 'moqui.runtime':moquiRuntime]
main = '-jar'; args = [warName]
}
task load(type: JavaExec) {
description "Run Moqui to load data; to specify data types and tenant use something like: gradle load -Ptypes=seed -PtenantId=EXAMPLE1"
dependsOn getRuntime, allBuildTasks
workingDir = '.'; jvmArgs = ['-server', '-XX:MaxPermSize=192m']; maxHeapSize = '512M'
systemProperties = ['moqui.conf':moquiConfDev, 'moqui.runtime':moquiRuntime]
main = '-jar'
def argList = [warName, '-load']
if (project.properties.containsKey('types')) argList.add("-types=${types}")
if (project.properties.containsKey('tenantId')) argList.add("-tenantId=${tenantId}")
args = argList
}
task loadProduction(type: JavaExec) {
dependsOn getRuntime, allBuildTasks
workingDir = '.'; jvmArgs = ['-server', '-XX:MaxPermSize=192m']; maxHeapSize = '512M'
systemProperties = ['moqui.conf':moquiConfProduction, 'moqui.runtime':moquiRuntime]
main = '-jar'
def argList = [warName, '-load']
if (project.properties.containsKey('types')) argList.add("-types=${types}")
if (project.properties.containsKey('tenantId')) argList.add("-tenantId=${tenantId}")
args = argList
}
task loadSaveExec << {
if (file(moquiRuntime+'/db/derby/MoquiDEFAULT').exists()) ant.zip(destfile: 'SaveDEFAULT.zip') { fileset(dir: moquiRuntime+'/db/derby/MoquiDEFAULT') { include(name: '**/*') } }
if (file(moquiRuntime+'/db/derby/MoquiTenant').exists()) ant.zip(destfile: 'SaveTenant.zip') { fileset(dir: moquiRuntime+'/db/derby/MoquiTenant') { include(name: '**/*') } }
if (file(moquiRuntime+'/db/h2').exists()) ant.zip(destfile: 'SaveH2.zip') { fileset(dir: moquiRuntime+'/db/h2') { include(name: '**/*') } }
if (file(moquiRuntime+'/db/orientdb/databases').exists()) ant.zip(destfile: 'SaveOrientDb.zip') { fileset(dir: moquiRuntime+'/db/orientdb/databases') { include(name: '**/*') } }
if (file(moquiRuntime+'/elasticsearch/data').exists()) ant.zip(destfile: 'SaveElasticSearch.zip') { fileset(dir: moquiRuntime+'/elasticsearch/data') { include(name: '**/*') } }
}
task loadSave {
description "Clean all, build and load, then save database (H2, Derby), OrientDB, and ElasticSearch files; to be used before reloadSave"
dependsOn cleanAll, load, loadSaveExec
}
task reloadSaveExec << {
if (file('SaveDEFAULT.zip').exists()) copy { from zipTree('SaveDEFAULT.zip'); into file(moquiRuntime+'/db/derby/MoquiDEFAULT') }
if (file('SaveTenant.zip').exists()) copy { from zipTree('SaveTenant.zip'); into file(moquiRuntime+'/db/derby/MoquiTenant') }
if (file('SaveH2.zip').exists()) copy { from zipTree('SaveH2.zip'); into file(moquiRuntime+'/db/h2') }
if (file('SaveOrientDb.zip').exists()) copy { from zipTree('SaveOrientDb.zip'); into file(moquiRuntime+'/db/orientdb/databases') }
if (file('SaveElasticSearch.zip').exists()) copy { from zipTree('SaveElasticSearch.zip'); into file(moquiRuntime+'/elasticsearch/data') }
}
task reloadSave {
description "After a loadSave clean database (H2, Derby), OrientDB, and ElasticSearch files and reload from saved copy"
dependsOn cleanTempDir, cleanDb, cleanOrientDb, cleanElasticSearch, cleanTxLog, cleanLog
dependsOn allBuildTasks
dependsOn reloadSaveExec
}
// ========== deploy tasks ==========
task deployTomcat << {
// remove runtime directory, may have been added for logs/etc
delete file(tomcatHome + '/runtime')
// remove ROOT directory and war to avoid conflicts
delete file(tomcatHome + '/webapps/ROOT')
delete file(tomcatHome + '/webapps/ROOT.war')
// copy the war file to ROOT.war
copy { from file(warName); into file(tomcatHome + '/webapps'); rename(warName, 'ROOT.war') }
}
task addRuntime {
description "Create a moqui-plus-runtime.war file with the Moqui WAR and the runtime directory embedded in it"
dependsOn getRuntime, allBuildTasks
doLast {
// unzip the "moqui-${version}.war" file to the wartemp directory
//directory { dir = file('wartemp') }
copy { from zipTree(warName); into file('wartemp') }
// copy runtime directory (with a few exceptions) into a runtime directory in the war
copy {
from fileTree(dir: '.', include: moquiRuntime+'/**',
excludes: ['**/*.jar', moquiRuntime+'/classes/**', moquiRuntime+'/lib/**', moquiRuntime+'/log/**'])
into file('wartemp')
}
// copy the jar files from runtime/lib
copy { from fileTree(dir: moquiRuntime+'/lib', include: '**/*.jar').files into 'wartemp/WEB-INF/lib' }
// copy the classpath resource files from runtime/classes
copy { from fileTree(dir: moquiRuntime+'/classes', include: '**/*') into 'wartemp/WEB-INF/classes' }
// copy the jar files from components
copy { from fileTree(dir: moquiRuntime+'/base-component', include: '**/*.jar').files into 'wartemp/WEB-INF/lib' }
copy { from fileTree(dir: moquiRuntime+'/component-lib', include: '**/*.jar').files into 'wartemp/WEB-INF/lib' }
copy { from fileTree(dir: moquiRuntime+'/component', include: '**/*.jar').files into 'wartemp/WEB-INF/lib' }
// add MoquiInit.properties fresh copy, just in case it was changed
copy { from file('MoquiInit.properties') into 'wartemp/WEB-INF/classes' }
// special case: copy elasticsearch plugin/module jars
copy { from fileTree(dir: '.', include: moquiRuntime+'/elasticsearch/**/*.jar') into file('wartemp') }
// special case: copy jackrabbit standalone jar (if exists)
copy { from fileTree(dir: moquiRuntime + '/jackrabbit', include: 'jackrabbit-standalone-*.jar').files; into 'wartemp/' + moquiRuntime + '/jackrabbit' }
// zip it up again
ant.zip(destfile: plusRuntimeName) { fileset(dir: 'wartemp') { include(name: '**/*') } }
// alternative once supported: zip { archiveName plusRuntimeName; from fileTree(dir: 'wartemp', include: '**/*') }
// clean up the temporary directory
delete file('wartemp')
}
}
// don't use this task directly, use addRuntimeTomcat which calls this
task deployTomcatRuntime << {
delete file(tomcatHome + '/runtime'); delete file(tomcatHome + '/webapps/ROOT'); delete file(tomcatHome + '/webapps/ROOT.war')
copy { from file(plusRuntimeName); into file(tomcatHome + '/webapps'); rename(plusRuntimeName, 'ROOT.war') }
}
task addRuntimeTomcat {
dependsOn addRuntime
dependsOn deployTomcatRuntime
}
// ========== component tasks ==========
task getDefaults {
description "Get a component using specified location type, also check/get all components it depends on; requires component property; locationType property optional (defaults to git if there is a .git directory, otherwise to current)"
doLast {
String curLocationType = file('.git').exists() ? 'git' : 'current'
if (project.hasProperty('locationType')) curLocationType = locationType
getComponentTop(curLocationType)
}
}
task getComponent {
description "Get a component using specified location type, also check/get all components it depends on; requires component property; locationType property optional (defaults to git if there is a .git directory, otherwise to current)"
doLast {
String curLocationType = file('.git').exists() ? 'git' : 'current'
if (project.hasProperty('locationType')) curLocationType = locationType
getComponentTop(curLocationType)
}
}
task getCurrent {
description "Get the current archive for a component, also check each component it depends on and if not present get its current archive; requires component property"
doLast { getComponentTop('current') }
}
task getRelease {
description "Get the release archive for a component, also check each component it depends on and if not present get its configured release archive; requires component property"
doLast { getComponentTop('release') }
}
task getGit {
description "Clone the git repository for a component, also check each component it depends on and if not present clone its git repository; requires component property"
doLast { getComponentTop('git') }
}
task getDepends {
description "Check/Get all dependencies for all components in runtime/component; locationType property optional (defaults to git if there is a .git directory, otherwise to current)"
doLast {
String curLocationType = file('.git').exists() ? 'git' : 'current'
if (project.hasProperty('locationType')) curLocationType = locationType
checkAllComponentDependencies(curLocationType)
}
}
Node parseAddons() { new XmlParser().parse(file('addons.xml')) }
Node parseMyaddons() { if (file('myaddons.xml').exists()) { new XmlParser().parse(file('myaddons.xml')) } else { null } }
def getComponentTop(String locationType) {
if (project.hasProperty('component')) {
checkRuntimeDirAndDefaults(locationType)
Set compsChecked = new TreeSet()
File componentDir = getComponent(component, locationType, parseAddons(), parseMyaddons(), compsChecked)
if (componentDir?.exists()) logger.lifecycle("Got component ${component}, dependent components checked: ${compsChecked}")
} else {
throw new InvalidUserDataException("No component property specified")
}
}
File getComponent(String compName, String type, Node addons, Node myaddons, Set compsChecked) {
// get the component
Node component = myaddons != null ? (Node) myaddons.component.find({ it."@name" == compName }) : null
if (component == null) component = (Node) addons.component.find({ it."@name" == compName })
if (component == null) throw new InvalidUserDataException("Component ${compName} not found in myaddons.xml or addons.xml")
if (component.'@skip-get' == 'true') { logger.lifecycle("Skipping get component ${compName} (skip-get=true)"); return null }
File componentDir = downloadComponent("runtime/component/${compName}", type, component, addons, myaddons)
checkComponentDependencies(compName, type, addons, myaddons, compsChecked)
return componentDir
}
File downloadComponent(String targetDirPath, String type, Node component, Node addons, Node myaddons) {
String compName = component.'@name'
String repositoryName = (component.'@repository' ?: 'github')
Node repository = myaddons != null ? (Node) myaddons.repository.find({ it."@name" == repositoryName }) : null
if (repository == null) repository = (Node) addons.repository.find({ it."@name" == repositoryName })
if (repository == null) throw new InvalidUserDataException("Repository ${repositoryName} not found in myaddons.xml or addons.xml")
Node location = (Node) repository.location.find({ it."@type" == type })
if (location == null) throw new InvalidUserDataException("Location for type ${type} now found in repository ${repositoryName}")
String url = Eval.me('component', component, '"""' + location.'@url' + '"""')
logger.lifecycle("Getting ${compName} (type ${type}) from ${url} to ${targetDirPath}")
File targetDir = file(targetDirPath)
if (targetDir.exists()) { logger.lifecycle("Component ${compName} already exists at ${targetDir}"); return targetDir }
if (type == 'current' || type == 'release') {
File zipFile = file("${targetDirPath}.zip")
ant.get(src: url, dest: zipFile)
// the eachFile closure removes the first path from each file, moving everything up a directory
copy { from zipTree(zipFile); into targetDir; eachFile { it.setPath((it.getRelativePath().getSegments() as List).tail().join("/")); return it } }
delete zipFile
// delete the empty directories left over from zip expansion with first path removed
String archiveDirName = compName + '-'
if (type == 'current') { archiveDirName += component.'@branch' } else { archiveDirName += component.'@version' }
// logger.lifecycle("Deleting dir ${targetDirPath}/${archiveDirName}")
delete file("${targetDirPath}/${archiveDirName}")
} else if (type == 'git') {
Grgit.clone(dir: targetDir, uri: url)
}
logger.lifecycle("Downloaded ${compName} to ${targetDirPath}")
return targetDir
}
def checkComponentDependencies(String compName, String type, Node addons, Node myaddons, Set compsChecked) {
File componentDir = file("runtime/component/${compName}")
if (!componentDir.exists()) return
compsChecked.add(compName)
File compXmlFile = file("${componentDir.path}/component.xml")
if (!compXmlFile.exists()) return
Node compXml = new XmlParser().parse(compXmlFile)
for (Node dependsOn in compXml.'depends-on') {
String depCompName = dependsOn.'@name'
if (file("runtime/component/${depCompName}").exists()) {
if (!compsChecked.contains(depCompName)) checkComponentDependencies(depCompName, type, addons, myaddons, compsChecked)
} else {
getComponent(depCompName, type, addons, myaddons, compsChecked)
}
}
}
def checkAllComponentDependencies(String type) {
Node addons = parseAddons()
Node myaddons = parseMyaddons()
Set compsChecked = new TreeSet()
for (File compDir in file('runtime/component').listFiles().findAll { it.isDirectory() && it.listFiles().find { it.name == 'component.xml' } }) {
checkComponentDependencies(compDir.name, type, addons, myaddons, compsChecked)
}
logger.lifecycle("Dependent components checked: ${compsChecked}")
}
// ========== combined tasks ==========
task cleanPullLoad { dependsOn cleanAll, gitPullAll, load }
task cleanPullTest { dependsOn cleanAll, gitPullAll, load, allTestTasks }
task cleanPullCompTest { dependsOn cleanAll, gitPullAll, load, getComponentTestTasks() }