...
The same command can be used inside a specific module directory to build that module only.
Info | ||
---|---|---|
| ||
You can use "-x" to skip specific tasks during the build lifecycle. |
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. Build artifacts are produced for each module inside the build/libs directory. JAR files are produced for main, tests and javadoc.
...
Info | ||
---|---|---|
| ||
Windows version of the wrapper command is also available as gradlew.bat |
The following gradle commands may also prove useful during development:
Code Block | ||
---|---|---|
| ||
# Show all the project dependencies
./gradle dependencies
# Show where a specific dependency for a gradle configuration comes from
./gradle dependencyInsight --dependency <name> --configuration <compile/runtime/testCompile/...>
# Prepare an Intellij IDEA workspace for Grouper
./gradle idea
# Prepare an Eclipse project workspace for Grouper
./gradle eclipse |
Gradle Wrapper Updates
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:
...
Info | ||
---|---|---|
| ||
The script file must be massaged for every branch to tell Travis to limit the build to that branch only. |
OAUTH token can be encrypted for Travis via the following command:
Code Block | ||
---|---|---|
| ||
gem install travis
travis login --github-token <TOKEN>
travis encrypt GH_TOKEN=<GH-TOKEN>-r Internet2/grouper |
- The TOKEN must be generated by you inside your Github profile settings. This is used to allow you to log into Travis.
- The GH-TOKEN must be generated by you inside your Github profile settings. This is used to allow Travis to push to the gh-pages branch.
- When the values are encrypted, they are printed back on the screen. Copy/paste them to the .travis.yml file under env/secure entry.
Publishing SNAPSHOTs
As part of the Travis CI build, SNAPSHOT artifacts for all grouper modules listed in the settings.gradle file are published to the Sonatype snapshot repositories for Grouper once a successful builds. This is handled via the deploy-to-sonatype.sh script that runs after the build. The script will attempt will collect all JAR artifacts produced by the build and will attempt to publish them. The command that used by the script is:
...
Code Block | ||
---|---|---|
| ||
gem install travis travis login --github-token <TOKEN> travis encrypt SONATYPE_USER=yourUsername -r Internet2/groupertravisgrouper travis encrypt SONATYPE_PWD=yourPassword -r Internet2/Grouper |
- The TOKEN must be generated by you inside your Github profile settings.
- When the values are encrypted, they are printed back on the screen. Copy/paste them to the .travis.yml file under env/secure entry.
...