This topic provides an overview of LabKey's Gradle-based build system.
Before following any of the steps below, you'll need to Set Up a Development Machine, including completing the Gradle Configuration steps.
In the steps below, we use <LK_ENLISTMENT> to refer to the directory into which you checked out your enlistment (i.e., the parent of the server directory).
1. Execute a gradle command to show you the set of currently configured projects (modules). You do not need to install gradle and should resist the urge to do so. We use the gradle wrapper to make updating version numbers easier. The gradle wrapper script (either gradlew or gradlew.bat) is included in the enlistment and is already in the <LK_ENLISTMENT> directory.
On the command line, type ./gradlew projects (Mac/Linux) or gradlew projects (Windows)
2. Execute a gradle command to build and deploy the application
./gradlew :server:deployApp
This will take some time as it needs to pull down many resources to initialize the local caches. Subsequent builds will be much faster.
Gradle uses the <LK_ENLISTMENT>/settings.gradle file to determine which projects (modules) are included in the build. By default, all modules included in the <LK_ENLISTMENT>/server/modules are included. To exclude any of these modules, or otherwise customize your build, you will need to edit this file. See the file for examples of different ways to include different subsets of the modules.
For a list of commonly used Gradle tasks, see Build LabKey From Source.
See Gradle Tips and Tricks.
See the topic Gradle Cleaning.
Follow these steps in order to make IntelliJ able to find all the source code and elements on the classpath as well as be able to run tests.
See the trouble shooting section in Set Up a Dev Machine.
previousnext |
expand allcollapse all |