Setup

Pick your poison.

Choose the modules you need

Pick one of our platform modules.

  • bukkit

  • bungee

  • kotlin

And at least one of our serializer modules (according to your preferred file type).

  • hocon

  • json

  • yaml

Add the library modules as a dependency

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

dependencies {
    // replace 'bukkit' with artifact name
    implementation 'com.github.secretx33.sc-cfg:bukkit:main-SNAPSHOT'
}

Relocate the library

This step is very important, sc-cfg won't work properly if you don't relocate it!

Variable yourPackage is just a suggestion for your package of dependencies, you can of course use another one.

plugins {
    id 'com.github.johnrengelman.shadow' version '7.0.0'
}

shadowJar {
    def yourPackage = "${project.group}.dependencies.${project.name}"
    relocate "com.github.secretx33.sccfg", "${yourPackage}.sccfg" 
    // these are all transitive dependencies, added here as convenience
    relocate "com.cryptomorin.xseries", "${yourPackage}.xseries" 
    relocate "com.typesafe.config", "${yourPackage}.typesafe.config" 
    relocate "io.leangen.geantyref", "${yourPackage}.geantyref" 
    relocate "javassist", "${yourPackage}.javassist" 
    relocate "javax.annotation", "${yourPackage}.javax.annotation" 
    relocate "org.reflections", "${yourPackage}.reflections" 
    relocate "org.slf4j", "${yourPackage}.slf4j" 
    relocate "org.spongepowered.configurate", "${yourPackage}.configurate" 
    relocate "org.yaml.snakeyaml", "${yourPackage}.snakeyaml" 
}

Last updated