Table of Contents
Benefits
Setup
Usage
Gradle Plugin Installation
units-of-measure is distributed as a Gradle plugin.
Latest version:
Generated Code Module
Creating a separate Gradle module for units-of-measure’s generated code is highly recommended.
settings.gradle
see full example on GitHub
uoms/build.gradle
see full example on GitHub
uoms/units-of-measure.gradle
see full example on GitHub
User Application Dependency
myapp/build.gradle
see full example on GitHub
units-of-measure comes ready to use with common SI units and quantities.
For the following customizations, please edit the uoms/units-of-measure.gradle
configuration:
- using imperial or non-SI units (e.g. Mile, Degree, Gallon, etc.)
- using uncommon quantities (e.g. Absement, VoltageSlewRate, etc.)
- shrinking size of compiled binary by fine-tuning which definitions are generated
‹ Benefit: Safe Flexibility
Basic Usage ››
Advanced Configuration ›