Powerful codec oriented config library made for my own use case. https://modrinth.com/project/greenhouse-config
  • Java 99.3%
  • Kotlin 0.7%
Find a file
Chrys Chrysanthemum cd7868491d
All checks were successful
Build / build (push) Successful in 1m12s
fix(build): Fix Forgejo ACtions to use the correct env var.
2026-07-16 14:15:54 +10:00
.forgejo/workflows fix(build): Fix Forgejo ACtions to use the correct env var. 2026-07-16 14:15:54 +10:00
build_logic chore: Bump versions. 2026-07-15 17:24:53 +10:00
fabric build: Reimplement API JAR and build script refactors. 2026-07-06 21:24:19 +10:00
gradle chore: Bump versions. 2026-07-15 17:24:53 +10:00
neoforge build: Reimplement API JAR and build script refactors. 2026-07-06 21:24:19 +10:00
templates fix: Rename template files to match current testmod ID. 2026-07-15 17:25:01 +10:00
xplat fix: Fix toSave field not removing both values. 2026-07-15 17:24:59 +10:00
.editorconfig refactor: Update .editorconfig for *.jsonc. 2026-01-02 23:55:41 +11:00
.gitattributes feat: Initial commit. 2025-12-22 18:52:28 +11:00
.gitignore feat: Initial commit. 2025-12-22 18:52:28 +11:00
build.gradle.kts feat: Initial commit. 2025-12-22 18:52:28 +11:00
CHANGELOG.md fix: Don't use the new codec to obtain comments from an old file. 2026-07-15 17:24:56 +10:00
gradle.properties fix: Update Mod Dev for a potential memory leak fix. 2026-02-26 18:27:48 +11:00
gradlew fix: Allow gradlew to be executed by owner. 2026-01-19 06:00:17 +11:00
gradlew.bat feat: Initial commit. 2025-12-22 18:52:28 +11:00
LICENSE feat: Initial commit. 2025-12-22 18:52:28 +11:00
README.md chore: Tweak README.md. 2026-07-06 23:05:37 +10:00
settings.gradle.kts refactor: Rename buildSrc to build_logic. 2025-12-31 06:48:02 +11:00

Greenhouse Config

The most overengineered config library out there!

Greenhouse Config is a config library pretty much made for myself (ChrysanthCow), and anyone within Greenhouse.

Featuring a rich config builder system, it utilizes Codecs/DFU to write and read config files, as well as being able to data-fix when out of date.

Configuration Language Support

* - Should not typically be used in configs. Use JSONC instead if possible.

Config languages are supported through the in house Polyamory library.

Depending on the Library

When depending on Greenhouse Config, please make sure to include the mod inside your JAR. This is simply to avoid making users have to download a separate dependency just to play with your mod.

The below is for Kotlin DSL, you will need to adjust this for Groovy DSL.


repositories {
	maven("https://maven.greenhouse.lgbt/releases") {
		name = "Greenhouse Maven"
	}
}

// Define attributes. These are potentially necessary for resolving the correct dependency.
// Feel free to delete either attribute if you do not use them.
val greenhouseModdingApiAttribute = Attribute.of("lgbt.greenhouse.modding.api", String::class.java)
val greenhouseModdingPlatformAttribute = Attribute.of("lgbt.greenhouse.modding.platform", String::class.java)

dependencies {
	// Depend on the Cross-Platform/Loader Independent API.
	compileOnly("lgbt.greenhouse.config:greenhouse-config:${greenhouse_config_version}") {
		attributes {
			attribute(greenhouseModdingApiAttribute, "") // The value of the attribute must remain an empty string.
		}
	}

	// Include the universal JAR in the runtime environment.
	runtimeOnly("lgbt.greenhouse.config:greenhouse-config:${greenhouse_config_version}")

	// Include the Fabric project in the runtime environment and your JAR, for Loom and derivatives.
	include("lgbt.greenhouse.config:greenhouse-config:${greenhouse_config_version}")

	// Include the NeoForge project in the runtime environment and your JAR, for ModDevGradle and derivatives.
	jarJar("lgbt.greenhouse.config:greenhouse-config:${greenhouse_config_version}")

	// IT IS RECOMMENDED THAT YOU USE THE API JAR DUE TO IMPL BEING ABLE TO BREAK AT ANY TIME.
	// In the case that you need impl classes for a specific loader, use this.
	compileOnly("lgbt.greenhouse.config:greenhouse-config:${greenhouse_config_version}") {
		attributes {
			// The https://github.com/mcgradleconventions attribute also works if you prefer it.
			attribute(
				greenhouseModdingPlatformAttribute,
				"xplat"
			) // The Greenhouse Platform attribute supports 'xplat', 'fabric' and 'neoforge'.
		}
	}
}
greenhouse_config_version=3.0.0+26.1.x

Have you seen that one XKCD comic about standards?

Quoted from kdl.dev.

Yes. I have. Please stop linking me to it.

Greenhouse Config is not meant to be a standard, it's simply my own methodology for doing configuration which I separated from my own mods to avoid having duplicate code across them.

At the end of the day, you should mod with tools you enjoy using, whether it be Greenhouse Config or something else.