-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The groovy-measures library aims to bring a DSL to groovy specifically for dealing with units of measure. For example, groovy-measures supports code like the following:
def distance = 9.meters + 34.centimeters
To use the groovy-measures library you must include the groovy-measures jar file in your application’s CLASSPATH and you must bootstrap the environment by loading the com.g2one.groovy.measures.GroovyMeasures class.
Class.forName 'com.g2one.groovy.measures.GroovyMeasures'
The library makes extensive use of JScience so the JScience jar file must also be on your application’s CLASSPATH. The library requires Groovy 1.6 and JScience 4.3.
Releases of the library may be downloaded from the Groovy-Measures Releases page.
The project is built using Gradle. Check the project out using Git and then use Gradle to build the jar file. See the following:
work $ git clone git://github.com/jeffbrown/groovy-measures.git Initialized empty Git repository in /work/groovy-measures/.git/ ... work $ cd groovy-measures/ groovy-measures $ gradle libs :build/classes :init :resources :compile :testResources :testCompile :test :archive_jar :libs BUILD SUCCESSFUL Total time: 6.146 secs groovy-measures $
Once the build is complete, the groovy-measures jar should be in the build/ directory at the top of the project.