Home

Awesome

Configurate

GitHub Workflow Status (branch) MIT License Maven Central Sonatype Nexus (Snapshots)

Configurate is a simple configuration library for Java applications that provides a node-based representation of data, able to handle a wide variety of configuration formats.

Want to talk to us about Configurate? Join us in the #dev channel on our Discord or start a thread on our (new!) Discussions page.

The current supported formats are:

Project Structure

The project is split into different modules.

Configurate core

configurate-core is the base of the library, containing the main APIs used to manipulate configurations. It is generic, and does not depend on any specific format of configuration.

Configurate loaders

Each distinct configuration format is implemented as a "configuration loader", in a separate module.

A number of loader implementations are provided as standard in this project, however it is possible to implement a custom loader for a new format separately.

The current supported loaders provided by the project are:

extras

Some features that don't need tight integration with Configurate itself are provided as separate modules. These are:

Usage

If your project uses Maven or Gradle, just add the following to your build scripts.

Gradle

repositories {
    mavenCentral()
}

dependencies {
    // Modify this line to target the loader you wish to use.
    compile 'org.spongepowered:configurate-hocon:4.0.0'
}

Maven

<dependencies>
    <dependency>
        <groupId>org.spongepowered</groupId>
        <!-- Modify this line to target the loader you wish to use. -->
        <artifactId>configurate-hocon</artifactId>
        <version>4.0.0</version>
    </dependency>
</dependencies>

More detailed usage instructions can be found in the Configurate wiki.

Contributing

Clone

The following steps will ensure your project is cloned properly.

  1. git clone https://github.com/SpongePowered/Configurate.git
  2. cd Configurate

Building

Note: If you do not have Gradle 7.0+ installed then use ./gradlew for Unix systems or Git Bash and gradlew.bat for Windows systems in place of any 'gradle' command.

In order to build Configurate you simply need to run the gradle build command. You can find the compiled JAR files in ./build/libs (found in each subproject) labeled similarly to '<subproject>-x.x.x-SNAPSHOT.jar'.

While the entire project can run on Java 8, the project requires Java 11 to build, and for multi-release JAR contents and some tests requires at least Java 16. Gradle will automatically download necessary JDK versions -- see their documentation for details on this feature, and how to point it at existing local installations.

Pull Requests

We love PRs! However, when contributing, here are some things to keep in mind: