Configurate YAML

A simple configuration library for Java applications that can handle a variety of formats and provides a node-based data structure able to handle a wide variety of configuration schemas

License

License

Categories

Categories

config Application Layer Libs Configuration Configurate Ninja User Interface Web Frameworks
GroupId

GroupId

ninja.leaping.configurate
ArtifactId

ArtifactId

configurate-yaml
Last Version

Last Version

3.7.1
Release Date

Release Date

Type

Type

jar
Description

Description

Configurate YAML
A simple configuration library for Java applications that can handle a variety of formats and provides a node-based data structure able to handle a wide variety of configuration schemas
Project URL

Project URL

http://configurate.aoeu.xyz//configurate-yaml/

Download configurate-yaml

How to add to project

<!-- https://jarcasting.com/artifacts/ninja.leaping.configurate/configurate-yaml/ -->
<dependency>
    <groupId>ninja.leaping.configurate</groupId>
    <artifactId>configurate-yaml</artifactId>
    <version>3.7.1</version>
</dependency>
// https://jarcasting.com/artifacts/ninja.leaping.configurate/configurate-yaml/
implementation 'ninja.leaping.configurate:configurate-yaml:3.7.1'
// https://jarcasting.com/artifacts/ninja.leaping.configurate/configurate-yaml/
implementation ("ninja.leaping.configurate:configurate-yaml:3.7.1")
'ninja.leaping.configurate:configurate-yaml:jar:3.7.1'
<dependency org="ninja.leaping.configurate" name="configurate-yaml" rev="3.7.1">
  <artifact name="configurate-yaml" type="jar" />
</dependency>
@Grapes(
@Grab(group='ninja.leaping.configurate', module='configurate-yaml', version='3.7.1')
)
libraryDependencies += "ninja.leaping.configurate" % "configurate-yaml" % "3.7.1"
[ninja.leaping.configurate/configurate-yaml "3.7.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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:

  • configurate-gson - Implementation for the JSON format, using the Gson library for parsing and generation
  • configurate-hocon - Implementation for the HOCON format, using the lightbend config library for parsing and generation
  • configurate-jackson - Implementation for the JSON format, using the Jackson library for parsing and generation
  • configurate-xml - Implementation for the XML format, using the JAXP library for parsing and generation
  • configurate-yaml - Implementation for the YAML format, using the SnakeYAML library for parsing and generation

extras

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

  • configurate-extra-dfu[2-4] - Integration between Mojang's DataFixerUpper and Configurate's systems.
  • configurate-extra-kotlin - Extensions to allow Configurate types to use Kotlin features, and support for Kotlin data classes in the object mapper.
  • configurate-extra-guice - Allows using a Guice Injector to create new object instances in the object mapper.

Usage

  • To use Configurate, your project must be configured to use Java 8 or higher.
  • Releases are on Maven Central and snapshot artifacts are hosted on Sonatype OSS. Builds are also included on SpongePowered's Maven Repository , available at https://repo.spongepowered.org/maven/.

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 6.8+ 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 '-x.x.x-SNAPSHOT.jar'.

While the entire project can run on Java 8, the project requires Java 11 to build, and some tests require at least Java 15 to run. Our CI will run these for you if you don't have the latest JDK set up locally.

Pull Requests

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

  • Take a look at open issues first before you get too far in -- someone might already be working on what you were planning on doing
  • In general, we follow the Sponge style guidelines for code style -- see the Contributing Guidelines for details.
  • Please, please, please test PRs. It makes the process a lot easier for everybody :)
ninja.leaping.configurate

SpongePowered

Organization behind the Sponge Project

Versions

Version
3.7.1
3.3
3.2
3.1.1
3.1
3.0
2.1
2.0
1.2.2
1.2.1
1.2
1.1.1
1.1
1.0.1
1.0
0.2
0.1