Previous Next        Current Page: NeXtMidas User's Guide / Using Gradle To Build NextMidas
back

Using Gradle To Build NextMidas

NeXtMidas now supports a Gradle Build



The current default directory structure of a NextMidas release is the "Midas" structure, but there are conversion scripts to switch the current directory structure to a Gradle compatible directory structure and place the various gradle build support files in their proper location.The README under $NMROOT/gradle/ contains useful information. This README.txt also refers to the README-PROPERTIES.txt which describes the settings needed in gradle.properties.

Topics covered in this page

gradle.properties file
Converting NextMidas to a Gradle Friendly Structure
Gradle Build
Generating Maven POM files from Gradle


gradle.properties file

The gradle.properties file is placed in ~/.grade. An example file is shown below.

-----------------------------------------------------------------------
S2P Nexus
-----------------------------------------------------------------------
#nexusPublicUrl=https://nexus.s2p.proj.nro.ic.gov/repository/Central/
nexusPublicUrl=https://nexus.s2p5i.proj.nro.ic.gov/repository/Central/
#nexusPublicUser=
#nexusPublicToken=
#nexusSnapshotUrl=https://localhost
#nexusSnapshotUser=
#nexusSnapshotToken=
--------------------------------------------------
Add my certificate for Nexus client authentication
--------------------------------------------------
systemProp.javax.net.ssl.keyStore=/home/user/[user]/Documents/certs/[cert_name].p12
systemProp.javax.net.ssl.keyStorePassword=[private_key_password]
systemProp.javax.net.ssl.trustStore=/home/user/[user]/cacerts
systemProp.javax.net.ssl.trustStorePassword=changeit


Converting NextMidas to a Gradle Friendly Structure

  1. cd to $NMROOT
  2. for a full/hard restructure: gradle/convertgradle.sh
  3. for a softlink restructure: gradle/linkgradle.sh

Gradle Build

  1. while in $NMROOT
  2. run one of the gradle build commands:
    • for minimal rebuild: gradle build
    • for full rebuild: gradle clean build
    • to build with debug: gradle clean build -Pdebug
    • to omit tests: gradle clean build -x test

Generating Maven POM files from Gradle

  1. run one of the gradle build commands from $NMROOT
  2. gradle publishToMavenLocal


back