You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Grouper's internal build mechanism is handled via Gradle. The build is orchestrated by a parent build.gradle file for the root grouper project and a number of individual build.gradle file for every module that Grouper presently houses. Each build.gradle file inherits from the parent build.gradle file and in turn is able to specify its own requirements for dependency management and source tree structure. The list of Grouper modules that are recognized by the Gradle build is specified via a settings.gradle in a specific order to account for the build dependencies of the modules. There is also one gradle.properties file which hosts specific build settings for the project, such as groupid, java version and dependency versions used throughout the project. 

To run the full build, issue the following command at the root:

./gradlew build -x test -x javadoc --parallel --stacktrace

The same command can be used inside a specific module directory to build that module only. 

The above command will use the Gradle wrapper to download an appropriate Gradle version once to be used for the build. This removes the requirement for a developer to explicitly have Gradle downloaded and installed, but if a Gradle installation is already available, the same command can be used via invoking the native Gradle instance installed. 

./gradle build -x test -x javadoc --parallel --stacktrace

Windows version of the wrapper command is also available as gradlew.bat

The Gradle wrapper need only exist at the root of the project. The wrapper can be updated to note a specific newer version of a Gradle via the following command:

./gradle wrapper

Build artifacts are produced for each module inside the build/libs directory. JAR files are produced for main, tests and javadoc. 

To produce the Javadoc for the entire project, run the following command at the root:

./gradlew build alljavadoc -x test -x javadoc --parallel --stacktrace
  • No labels