Configur8 Build Status Coverage Status Download Watch

Nano-library which provides the ability to define typesafe (!) Configuration templates for applications.

Concept:

A Configuration is a set of named and typed Property instances, which are defined using a ConfigurationTemplate. Each defined Property can be set with a default value, or be blank with a requirement to be overridden. At runtime, the template is reified into a concrete Configuration object, but if any properties are missing this process will throw a Misconfiguration error.

Assuming that the reification process is successful, property values can be retrieved in an (actually) type-safe manner, and are applied in the following descending order of precedence:

  1. Named environment property
  2. JVM system property
  3. Default value

Get it:

Currently, the library is published in Java, Kotlin and Scala versions in JCenter (and synced to Maven Central).

Maven:

Java:

<dependency>
  <groupId>io.github.daviddenton</groupId>
  <artifactId>configur8</artifactId>
  <version>1.1.3</version>
</dependency>

Kotlin:

<dependency>
  <groupId>io.github.daviddenton</groupId>
  <artifactId>konfigur8</artifactId>
  <version>1.1.3</version>
</dependency>

SBT:

libraryDependencies += "io.github.daviddenton" %% "configur8" % "1.1.3"

See it:

See the example code in scala or java.