Skip to content

Installation

GroundbreakingMC edited this page Oct 3, 2025 · 1 revision

Installation

This guide covers how to add TOMLy to your Java project.

Requirements

  • Java: 17 or higher

Adding TOMLy to Your Project

TOMLy is distributed via JitPack. You need to add the JitPack repository and then the dependency.

Gradle (Kotlin DSL)

Add to your build.gradle.kts:

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.GroundbreakingMC:TOMLy:1.0.0")
}

Gradle (Groovy)

Add to your build.gradle:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.GroundbreakingMC:TOMLy:1.0.0'
}

Maven

Add to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.GroundbreakingMC</groupId>
        <artifactId>TOMLy</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>

Dependencies

TOMLy includes the following transitive dependencies:

These are automatically downloaded by your build tool.

Verifying Installation

Create a simple test to verify TOMLy is working:

import com.github.groundbreakingmc.tomly.Tomly;
import com.github.groundbreakingmc.tomly.nodes.TomlDocument;
import com.github.groundbreakingmc.tomly.options.PreserveOptions;

public class TomlTest {
    public static void main(String[] args) {
        String toml = "name = \"test\"";
        TomlDocument doc = Tomly.parse(toml, false, PreserveOptions.defaultOptions());
        System.out.println(doc.getStr("name")); // Should print: test
    }
}

Troubleshooting

JitPack Build Issues

If you encounter issues with JitPack, try:

  1. Clear your Gradle/Maven cache
  2. Check JitPack build logs
  3. Verify your internet connection allows access to jitpack.io

Version Conflicts

If you have dependency conflicts:

// Exclude conflicting dependencies
implementation("com.github.GroundbreakingMC:TOMLy:1.0.0") {
    exclude(group = "org.jetbrains", module = "annotations")
}

Java Version Issues

Ensure your project targets Java 17+:

// Gradle Kotlin DSL
kotlin {
    jvmToolchain(17)
}

// Or
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
    }
}

Next Steps

  • Now that TOMLy is installed, continue to Getting Started to learn how to use it.

Clone this wiki locally