-
Notifications
You must be signed in to change notification settings - Fork 179
Gradle build properties
The gradle.properties
file is a way to specify options to a Gradle build. It's documented here. The following are the contents of Christian's ~/.gradle/gradle.properties
file as of 2017-02-03, along with an explanation of what the properties do.
# For tests annotated with NeedsCdmUnitTest
systemProp.unidata.testdata.path=/Users/cwardgar/dev/data
# For tests annotated with NeedsContentRoot
systemProp.tds.content.root.path=/Users/cwardgar/dev/projects/thredds2/tds/src/test/content
# For Dennis's thredds.server.reify.TestDownload
systemProp.tds.download.dir=/tmp/download
# Location of NetCDF-4 C library
systemProp.jna.library.path=/opt/netcdf-4.4.1/lib
# For signing Web Start jars and syncing them to our web server.
# "/web" is on www.unidata.ucar.edu
keystore=PRIVATE
keystoreAlias=PRIVATE
keystorePassword=PRIVATE
webdir=/Volumes/web/content/software/thredds/v4.6/netcdf-java
# Publishing
nexus.username=PRIVATE
nexus.password=PRIVATE
# For https://coveralls.io/github/Unidata/thredds
coveralls.repo.token=PRIVATE
# For https://sonarqube.com/dashboard/index/thredds
sonarqube.user.token=PRIVATE
# Enable/disable Gradle daemon.
org.gradle.daemon=false
# Debug Gradle itself.
org.gradle.debug=false
# Debug tests run by Gradle.
#systemProp.test.debug=true
All PRIVATE
values can be found on the UCAR wiki.
-
systemProp.unidata.testdata.path
: sets theunidata.testdata.path
system property, for use by tests annotated withNeedsCdmUnitTest
. You should comment this one out unless you have a local copy of our test data like I do. -
systemProp.tds.content.root.path
: sets thetds.content.root.path
system property, for use by tests annotated withNeedsContentRoot
. All of the catalogs that we need for our tests already exist in the repo attds/src/test/content
. However, I believe the path needs to be absolute (e.g./Users/cwardgar/dev/projects/thredds2/tds/src/test/content
), so modify as needed. -
systemProp.tds.download.dir
: sets thetds.download.dir
system property, which is used by Dennis'sthredds.server.reify.TestDownload
-
systemProp.jna.library.path
: sets thejna.library.path
system property, which points to the directory in which libnetcdf is installed.
Java Web Start requires that jars be signed, so that clients can verify that those artifacts came from the expected source and have not been tampered with. We use the following properties in :ui:releaseWebstart
for signing:
-
keystore
: location of the Unidata keystore database, which contains the key pair and certificate that we use to sign jars. -
keystoreAlias
: identifies the key pair and certificate within the keystore that we're signing with. -
keystorePassword
: the password that protects the keystore.
webdir
is the network directory to which Web Start artifacts are deployed (in :ui:releaseWebstart
) and to which Javadoc artifacts are deployed (in :cdm:releaseDocs
and :ui:releaseDocs
). The complete path is www.unidata.ucar.edu:/web/content/software/thredds/v${release.major}/netcdf-java/
, where ${release.major}
refers to the truncated, 2-part version string (e.g. 4.6
). You'll need to mount www.unidata.ucar.edu:/web/
to some directory on your file system. For example, on OSX I've mounted it to /Volumes/web/
, which results in webdir=/Volumes/web/content/software/thredds/v4.6/netcdf-java
.
nexus.username
and nexus.password
are the login credentials to the Unidata Nexus server. The :publish
task needs those values in order to deploy Maven artifacts to the Releases and Snapshots repositories.
coveralls.repo.token
is the access token associated with our Coveralls code coverage report. It is used by the :coveralls
task to upload new metrics after unit tests are run.
sonarqube.user.token
is the access token associated with our SonarQube static analysis report. It is used by the :sonarqube
task to upload new metrics.
-
org.gradle.daemon
: Enable/Disable the Gradle Daemon, which reduces build time.true
by default, as of Gradle 3.0. When debugging, make sure this isfalse
. -
org.gradle.debug
: This is for debugging Gradle itself. You can only set breakpoints in Gradle classes and plugin classes, not in DSL blocks. -
systemProp.test.debug
: This is for debugging tests run by Gradle. Note that only the presence of this property is examined, not it's value. See https://goo.gl/aLOE4M. As a result, setting the value tofalse
turns the feature ON just the same as setting it totrue
(or anything else) does. So, to turn it off, we have to comment it out.
All of the above properties can be set on the command-line, instead of in gradle.properties
. In fact, that is what we do on Jenkins. You can see it in the Build->Switches
section of the thredds5.0 configuration page.