Instead of building all of your modules from source, you can choose to use prebuilt module archives that will be downloaded from an artifact server.

Which modules are built from source is controlled by the buildFromSource property. This property can be set at the <LK_ENLISTMENT level> (i.e. the root of your enlistment), 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 <LK_ENLISTMENT level>/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
  • <LK_ENLISTMENT level>/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
  • <LK_ENLISTMENT level>/gradle.properties

Then run

gradlew deployApp

Build a single module from source

Set "buildFromSource=false" in

<LK_ENLISTMENT level>/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 everything from source EXCEPT one or more modules

Set "buildFromSource=true" in

<LK_ENLISTMENT level>/gradle.properties

Then:

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

Build a subset of modules from source

Set "buildFromSource=false" in

<LK_ENLISTMENT level>/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

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all