A few of the options this enables:
By default, the standard build tasks use the manifest file "/settings.gradle". You can edit this file to customize the modules that are built. settings.gradle includes a mix of wildcards and individually listed modules.
Common syntax includes variations on lists of "includedModules" and "excludedModules".
The following builds every module under the localModules directory that is contained in an app directory. Note that app is the parent of the module directories, not the module directory itself.
def excludedModules = ["inProgress"]
// The line below includes all modules under the localModules directory that are contained in a directory "app".
// The modules are subdirectories of app, not app itself.
BuildUtils.includeModules(this.settings, rootDir, [**/localModules/**/app/*], excludedModules);
The following builds every module directory in "server/modules", except those listed as excludedModules:
def excludedModules = ["inProgress"]
// The line below includes all modules in the server/modules directory (except the ones indicated as to be excluded)
BuildUtils.includeModules(this.settings, rootDir, [BuildUtils.SERVER_MODULES_DIR], excludedModules);
The following adds the 'dataintegration' module to the build.
// The line below is an example of how to include a single module
include ":server:modules:dataintegration"
You can also create custom module manifest files. For example, the following manifest file 'local_settings.gradle' provides a list of individually named modules:
include ':server:bootstrap'
include ':server:modules:commonAssays:ms2'
include ':server:modules:commonAssays:luminex'
include ':server:modules:platform:announcements'
include ':server:modules:platform:api'
include ':server:modules:platform:assay'
include ':server:modules:platform:audit'
include ':server:modules:platform:core'
include ':server:modules:platform:devtools'
include ':server:modules:platform:experiment'
include ':server:modules:platform:filecontent'
include ':server:modules:platform:internal'
include ':server:modules:platform:issues'
include ':server:modules:platform:list'
include ':server:modules:platform:mothership'
include ':server:modules:platform:pipeline'
include ':server:modules:platform:query'
include ':server:modules:platform:search'
include ':server:modules:platform:study'
include ':server:modules:platform:wiki'
include ':server:modules:targetedms'
include ':server:testAutomation:modules:dumbster'
include ':server:testAutomation:modules:pipelinetest'
The following uses the custom manifest file in the build:
gradlew -c local_settings.gradle deployApp
Instead of supplying a local settings file and using the -c option, you can put your setting file in the <LABKEY_HOME>/gradle/settings directory and use the moduleSet property to tell Gradle to pick up this settings file. The property value should be the basename of the settings file you wish to you. For example,
gradlew -PmoduleSet=all
The build targets can be made to ignore a module if you define the property skipBuild for this project. You can do this by adding a gradle.properties file in the project's directory with the following content:
skipBuild
Note that we check only for the presence of this property, not its value.
When you have been building with a module and want to remove it completely, you should add it to an "excludedModules" list in your settings.gradle file and also need to use the unDeploy task in the module's directory.
For example, to remove the "dumbster" module you would add it to either "excludedModules" or "excludedExternalModules" (depending on where it is located in your enlistment) and before rebuilding, go to where it is installed and execute:
gradlew unDeploy