io.github.com6235.configurator 1.0.1
Install 1/2: Add this to pom.xml:
Learn more about Maven or Gradle
<dependency>
<groupId>io.github.com6235</groupId>
<artifactId>configurator</artifactId>
<version>1.0.1</version>
</dependency>
Install 2/2: Run via command line
$ mvn install
About this package
Thing to automatically load config from different formats. Supports custom formats.
Uses kotlinx.serialization.
Currently, it supports JSON (json), HOCON (conf, hocon), TOML (toml), YAML (yaml) and Properties (properties)
Latest version: https://github.com/Com6235/maven-libs/packages/2156249
After you added the repository, you can start using my package by adding this to your pom.xml
<dependency>
<groupId>io.github.com6235</groupId>
<artifactId>configurator</artifactId>
<version>${your desired version}</version>
</dependency>After you added the repository, you can start using my package by adding this to dependencies:
In build.gradle.kts:
dependencies {
implementation("io.github.com6235:configurator:${your desired version}")
}In build.gradle:
dependencies {
implementation 'io.github.com6235:configurator:${your desired version}'
}import io.github.com6235.configurator.ConfigLoader
import kotlinx.serialization.Serializable
@Serializable
data class Config(val helpPages: List<String>)
fun main() {
val configStream = this::class.java.getResourceAsStream("config.json")!! // change to any format, that it supports
val config = ConfigLoader(Config.serializer()).loadConfig(configStream, "json") // change to any format, that it supports
println(config.helpPages)
}import io.github.com6235.configurator.ConfigLoader
import kotlinx.serialization.Serializable
@Serializable
data class Config(val name: String)
fun main() {
val loader = ConfigLoader(Config.serializer())
while (true) {
val s = readln()
loader.saveConfig(Config(s), Path("./name.json"))
}
}Details
-
Com6235
- May 21, 2024
- 6 dependencies
- MIT License
Assets
- configurator-1.0.1-sources.jar.md5
- configurator-1.0.1-sources.jar.sha1
- configurator-1.0.1-sources.jar
- configurator-1.0.1.module.md5
- configurator-1.0.1.module.sha1
- configurator-1.0.1.module
- configurator-1.0.1-javadoc.jar.md5
- configurator-1.0.1-javadoc.jar.sha1
- configurator-1.0.1-javadoc.jar
- configurator-1.0.1.pom.md5
- configurator-1.0.1.pom.sha1
- configurator-1.0.1.pom
- configurator-1.0.1.jar.md5
- configurator-1.0.1.jar.sha1
- configurator-1.0.1.jar
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0