Which modules are built from source is controlled by the buildFromSource property. This property can be set at the LABKEY_ROOT level, at the project level, at the global (user) level, or on the command line (with overrides happening in the order given).

The default properties file in LABKEY_ROOT/gradle.properties has the following property defined

buildFromSource=true

This setting will cause a build command to construct all the jars and the .module files that are necessary for a server build. But if you are not changing code, you do not need to build everything from source. The following table illustrates how you can specify the properties to build just the source code you need to build.

If you want to...

then...

Build nothing from source

Set

buildFromSource=false

In one of:

  • Command line (-PbuildFromSource=false)
  • HOME_DIR/.gradle/gradle.properties
  • LABKEY_ROOT/gradle.properties

Then run

gradlew deployApp

 

Build everything from source

Set

buildFromSource=true

In one of

  • Command line (-PbuildFromSource=true)
  • HOME_DIR/.gradle/gradle.properties
  • LABKEY_ROOT/gradle.properties

Then run

gradlew deployApp

Build a single module from source

Set

buildFromSource=false

In

LABKEY_ROOT/gradle.properties


Then

EITHER (most efficient) run

deployModule command for that module (e.g., gradlew :server:opt:cds:deployModule)


OR (Less efficient)

  • create a gradle.properties file within the directory of the module you want to build from source
  • include the setting buildFromSource=true
  • issue the deployApp command

Build a subset of modules from source

Set

buildFromSource=false

In

LABKEY_ROOT/gradle.properties

Then

EITHER (most efficient) run

deployModule command for the modules you wish to build (e.g., gradlew :server:opt:cds:deployModule)


OR (Less efficient)

  • create a gradle.properties file within the module directories of each module you want to build from source
  • include the setting buildFromSource=true in each file
  • issue the deployApp command

Related Topics

Build LabKey from Source

Gradle: Declare Dependencies

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all