Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d98dcd9
start the big refactor stuff
Klebestreifen Jan 12, 2026
c912c1a
APIlice the module system
Klebestreifen Jan 13, 2026
06cafd8
ModuleIdentifier is not longer a ResourceLocation
Klebestreifen Jan 13, 2026
7291687
Reduce casting polymorthism
Klebestreifen Jan 13, 2026
14d54bb
less silly
rozbrajaczpoziomow Jan 13, 2026
d411078
language changes
rozbrajaczpoziomow Jan 13, 2026
34fea66
IModuleIdentifier#toResourceLocation
rozbrajaczpoziomow Jan 13, 2026
3f7ae8c
sounds reasonable
rozbrajaczpoziomow Jan 13, 2026
24a5c5f
try to make me friends lul
Klebestreifen Jan 14, 2026
5c5b5e0
refactor the regitry code
Klebestreifen Jan 14, 2026
32a48fe
more sillyness
rozbrajaczpoziomow Jan 14, 2026
0add07a
Reimplement some Recipe code less "sIlLy" lol
Klebestreifen Jan 15, 2026
9875465
idk tasty recipes or something
rozbrajaczpoziomow Jan 15, 2026
464c3d8
add another list util, as well as do a general extension code pass
rozbrajaczpoziomow Jan 15, 2026
7431bfa
fix build
rozbrajaczpoziomow Jan 16, 2026
31d015e
some slight unimportant changes
rozbrajaczpoziomow Jan 16, 2026
f7d3122
fix some stuff IJ is complaining about
rozbrajaczpoziomow Jan 18, 2026
af3b16d
finally rename SIZE
rozbrajaczpoziomow Jan 18, 2026
52c21fb
why were these getters
rozbrajaczpoziomow Jan 18, 2026
b1232ae
drawRect actually already calls GlSM#setColor
rozbrajaczpoziomow Jan 18, 2026
b0674f1
Add docs
Klebestreifen Jan 18, 2026
4ac304f
Move extensions to api so they are public avalible
Klebestreifen Jan 18, 2026
da467c5
Move extensions to common and refactor validation
Klebestreifen Jan 18, 2026
86aacf8
do a bit of validation eating
rozbrajaczpoziomow Jan 18, 2026
5365312
sync template
rozbrajaczpoziomow Jan 18, 2026
89e3250
sync template
rozbrajaczpoziomow Jan 19, 2026
c3a18d1
General refactor
Klebestreifen Jan 20, 2026
9992b3a
remove NetworkUtils in favour of extensions, other smaller thingies
rozbrajaczpoziomow Jan 21, 2026
d0cba05
fix mixin
rozbrajaczpoziomow Jan 22, 2026
aa29cab
remove this thing and hopefully we all forget about it
rozbrajaczpoziomow Jan 22, 2026
69a70f2
fix fluidutils not being usable
rozbrajaczpoziomow Jan 22, 2026
c22c066
small amount of rendering bs
rozbrajaczpoziomow Jan 22, 2026
24a8a1c
some more extension sillyness
rozbrajaczpoziomow Jan 22, 2026
da1027e
eat SideUtils into Utils
rozbrajaczpoziomow Jan 23, 2026
7bb4e38
try to do some FieldValidationBuilder shenanigans
rozbrajaczpoziomow Jan 23, 2026
a32d4fa
make it build
rozbrajaczpoziomow Jan 23, 2026
2b6fb7b
explicit backing fields test
rozbrajaczpoziomow Jan 23, 2026
3527416
slight IItemStackHash cleanup and also new extension
rozbrajaczpoziomow Jan 25, 2026
454a65d
spotless complaining
rozbrajaczpoziomow Jan 25, 2026
2e8ca65
idk why not
rozbrajaczpoziomow Jan 25, 2026
7d3951f
merge DevUtils into SideUtils, rename to EnvironmentUtils
rozbrajaczpoziomow Jan 25, 2026
5301d6b
I can spell…
rozbrajaczpoziomow Jan 25, 2026
51f7a98
some small annoying changes for no reason
rozbrajaczpoziomow Jan 26, 2026
c1c3caa
more stuff from earlier kt versions idk
rozbrajaczpoziomow Jan 26, 2026
65913fd
some other smaller changes
rozbrajaczpoziomow Jan 26, 2026
be24c51
update build scripts
MasterEnderman Jan 26, 2026
d00dc52
me when the kotlin compiler warnings lie
rozbrajaczpoziomow Jan 27, 2026
85606c9
I did some things. meow. :3
MasterEnderman Feb 2, 2026
bed9c17
Update ICatalyxMod.kt
MasterEnderman Feb 2, 2026
e28a3c4
eat ender's code as usual
rozbrajaczpoziomow Feb 2, 2026
43c2bbd
is this how to make the api
rozbrajaczpoziomow Feb 2, 2026
6f171f3
take this chance to eat AreaHighlighter
rozbrajaczpoziomow Feb 3, 2026
04e99e5
kinda silly that this isn't a stdlib function
rozbrajaczpoziomow Feb 3, 2026
f2e422b
work a bit on the copy-paste tool
rozbrajaczpoziomow Feb 4, 2026
1210569
statemachine for future TileEntities
MasterEnderman Feb 13, 2026
afb16d8
update buildscripts
MasterEnderman Feb 13, 2026
0b94ee4
refactor various things
MasterEnderman Feb 26, 2026
98e8986
refactor config helpers
MasterEnderman Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/scopes/Catalyx_Source.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ link(shield("License", "License", "LGPL-3.0", "blue"), "{{mod_url}}/blob/master/
"{{mod_description}}".replace("Kotlin", link("Kotlin", "https://kotlinlang.org/")).replace("Ender-Development's mods", link("Ender-Development's mods", "https://www.curseforge.com/members/enderdevelopment/projects"))
].join("\n")
-->
[![Kotlin](https://img.shields.io/badge/Kotlin-2.2.20-blue.svg)](https://kotlinlang.org/)
[![Kotlin](https://img.shields.io/badge/Kotlin-2.3.0-blue.svg)](https://kotlinlang.org/)
[![Maven artifact](https://img.shields.io/badge/Maven-org.ender__development%3Acatalyx-blue.svg)](https://maven.ender-development.org/org/ender_development/catalyx/)
[![Version](https://img.shields.io/badge/Version-0.1.0-blue.svg)](https://github.com/Ender-Development/Catalyx/commits/master)
[![License](https://img.shields.io/badge/License-LGPL--3.0-blue.svg)](https://github.com/Ender-Development/Catalyx/blob/master/LICENSE)
Expand Down
14 changes: 11 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {
id("catalyx.propsync")
id("catalyx.buildfilesync")
id("catalyx.referencecreator") apply false
id("catalyx.ijscopecreator")
id("java")
id("java-library")
id("maven-publish")
Expand Down Expand Up @@ -62,7 +63,14 @@ checkSubPropertiesExist("use_groovyscript", "groovyscript_version")
checkSubPropertiesExist("use_hei", "hei_version")
checkSubPropertiesExist("use_top", "top_version")

kotlin { jvmToolchain(8) }
kotlin {
jvmToolchain(8)
compilerOptions {
freeCompilerArgs.add("-Xexplicit-backing-fields")
freeCompilerArgs.add("-Xcontext-sensitive-resolution")
extraWarnings.set(true)
}
}

minecraft {
mcVersion = propertyString("minecraft_version")
Expand Down Expand Up @@ -244,8 +252,8 @@ tasks.withType<Jar> {
if (propertyBoolean("coremod_includes_mod")) {
attributeMap["FMLCorePluginContainsFMLMod"] = "true"
val currentTask = gradle.startParameter.taskNames
val validTasks = listOf("build", "prepareObfModsFolder", "runObfClient")
if (currentTask[0] in validTasks) attributeMap["ForceLoadAsMod"] = "true"
val validTasks = arrayOf("build", "prepareObfModsFolder", "runObfClient")
if (!currentTask.isEmpty() && currentTask[0] in validTasks) attributeMap["ForceLoadAsMod"] = "true"
}
}
if (propertyBoolean("use_access_transformer")) {
Expand Down
87 changes: 87 additions & 0 deletions buildSrc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Catalyx Buildscripts Changelog

<!--
Writing a changelog is a good practice for maintaining a clear history of changes in your project.
Try to follow the [Common Changelog](https://common-changelog.org/) conventions.
-->

## [0.5.2] - 2026-02-03

_general maintenance._

- update dependencies
- add a few more mavens

## [0.5.1] - 2026-01-26

_this is fine._

- update dependencies
- enable a few experimental kotlin features
- experimental: sync kotlin version from template

## [0.5.0] - 2026-01-19

_Happy new year._

- extend secrets management
- fix package name in reference creator
- add indent guesser for reference creator
- update dependencies
- auto create IntelliJ scope file
- improve sync plugin

## [0.4.1] - 2025-11-26

_that one is on me._

- fix dependency loader

## [0.4.0] - 2025-11-17

_sync scripts_

- implement local plugin updater
- add .gitattributes
- fix new tag implementation

## [0.3.0] - 2025-11-08

_spotless flex_

- utilize flexmark
- update docs
- replace RFG tag system with a new implementation

## [0.2.0] - 2025-10-29

_Look at this pretty image._

- organization assets
- update dependencies
- .editorconfig profiles

## [0.1.0] - 2025-10-18

_You could almost call it usable._

- spotless formatting
- .editorconfig
- property sync from template
- groovyscript jvm argument management
- proper dependency manager

## [0.0.2] - 2025-10-14

_The second iteration..._

- change license
- we now use a local plugin structure

## [0.0.1] - 2025-10-13

_The first iteration..._

## [0.0.0] - 2025-10-09

_Initial commit._
4 changes: 4 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ gradlePlugin {
id = "catalyx.referencecreator"
implementationClass = "plugins.ReferenceCreator"
}
create("ijScopeCreatorPlugin") {
id = "catalyx.ijscopecreator"
implementationClass = "plugins.IJScopeCreator"
}
}
}
66 changes: 56 additions & 10 deletions buildSrc/src/main/kotlin/Repositories.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,33 @@ import org.gradle.kotlin.dsl.repositories
fun Project.loadDefaultRepositories() {
repositories {
mavenCentral()
// RetroFuturaGradle
maven {
name = "CleanroomMC Maven"
url = uri("https://maven.cleanroommc.com")
name = "GTNH Maven"
url = uri("https://nexus.gtnewhorizons.com/repository/public/")
}
// JitPack is a novel package repository for JVM and Android projects.
// It builds Git projects on demand and provides you with ready-to-use artifacts (jar, aar).
// Docs: https://docs.jitpack.io/
maven {
name = "JitPack"
url = uri("https://jitpack.io")
}
maven {
name = "SpongePowered Maven"
url = uri("https://repo.spongepowered.org/maven")
}
// HEI, MixinBooter, GroovyScript, Forgelin Continuous, ...
maven {
name = "CleanroomMC Maven"
url = uri("https://maven.cleanroommc.com")
}
// Our own maven, meow :3
maven {
name = "Ender-Development Maven"
url = uri("https://maven.ender-development.org/")
}
// Better implementation of the curseforge maven, which allows adding mods that disable third party downloads
exclusiveContent {
forRepository {
maven {
Expand All @@ -34,25 +53,52 @@ fun Project.loadDefaultRepositories() {
includeGroup("maven.modrinth")
}
}
// CraftTweaker, ContentTweaker, BWM, JEI, ...
maven {
name = "BlameJared's Maven"
url = uri("https://maven.blamejared.com/")
}
// GTCE, GTCEu, AE2uel, EnderIO
maven {
name = "JitPack"
url = uri("https://jitpack.io")
name = "GTCEu Maven"
url = uri("https://maven.gtceu.com")
}
// AE2, Mekanism, ProjectE, ComputerCraft, OpenComputers, ...
maven {
name = "Ender-Development Maven"
url = uri("https://maven.ender-development.org/")
name = "Thiakil's Maven"
url = uri("https://maven.thiakil.com/")
}
maven {
name = "GTNH Maven"
url = uri("https://nexus.gtnewhorizons.com/repository/public/")
name = "AppleCore's Maven"
url = uri("https://www.ryanliptak.com/maven/")
}
// TiCo, Mantle, HungerOverhaul, Natura, IronChest, ...
maven {
name = "GTCEu Maven"
url = uri("https://maven.gtceu.com")
name = "Mantle's Maven"
url = uri("https://dvs1.progwml6.com/files/maven")
}
// CTM
maven {
name = "tterrag's Maven"
url = uri("https://maven.tterrag.com/")
}
// cofh, codechicken, ProjectRed, p455w0rd, brandon3055, ...
maven {
name = "covers1624's Maven"
url = uri("https://maven.covers1624.net/")
}
maven {
name = "modmuss50's Maven"
url = uri("https://maven.modmuss50.me/")
}
maven {
name = "BuildCraft's Maven"
url = uri("https://mod-buildcraft.com/maven/")
}
// Large collection of mods from various authors, curseforge maven precursor
maven {
name = "ModMaven"
url = uri("https://modmaven.dev/")
}
mavenLocal() // Must be last for caching to work
}
Expand Down
46 changes: 46 additions & 0 deletions buildSrc/src/main/kotlin/plugins/IJScopeCreator.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package plugins

import org.gradle.api.Plugin
import org.gradle.api.Project
import propertyString
import util.OnlineUtils
import kotlin.io.path.createDirectories
import kotlin.io.path.createFile
import kotlin.io.path.div
import kotlin.io.path.notExists
import kotlin.io.path.writeText

@Suppress("UNUSED")
class IJScopeCreator : Plugin<Project> {
companion object {
const val SCOPE_FILE = "Mod_Source.xml"

private fun createIJScope(project: Project) {
if (OnlineUtils.isTemplateProject()) {
return
}

val modName = project.propertyString("mod_name")
val filteredModName = modName.filter(Char::isLetterOrDigit)
val outputPath = project.rootDir.toPath() / ".idea" / "scopes" / SCOPE_FILE

val ijScope = buildString {
appendLine("<component name=\"DependencyValidationManager\">")
appendLine(" <scope name=\"$modName Source\" pattern=\"file[$filteredModName.main]:*/&amp;&amp;!file[$filteredModName.main]:resources//*\" />")
appendLine("</component>")
}

if (outputPath.notExists()) {
outputPath.parent.createDirectories()
outputPath.createFile()
}
outputPath.writeText(ijScope)
Logger.info("IntelliJ scope file created at ${outputPath.normalize()}")
}
}

override fun apply(target: Project) {
Logger.greet(this)
createIJScope(target)
}
}
21 changes: 14 additions & 7 deletions buildSrc/src/main/kotlin/plugins/PropSync.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.nio.file.StandardCopyOption
import java.util.Properties

class PropSync : Plugin<Project> {
data class SyncConfig(val keysToSync: List<String> = emptyList(), val syncAll: Boolean = false)
data class SyncConfig(val keysToSync: List<String> = emptyList(), val syncAll: Boolean = false, val path: String = "buildSrc/src/main/resources/")

companion object {
private var foundUpdate = false
Expand Down Expand Up @@ -46,6 +46,11 @@ class PropSync : Plugin<Project> {
"tags.properties" to SyncConfig(
syncAll = true,
),
// This one is new, still needs to be tested
"gradle.properties" to SyncConfig(
keysToSync = listOf("kotlin_version"),
path = "",
),
)

fun syncPropertiesFromTemplate() {
Expand All @@ -59,12 +64,12 @@ class PropSync : Plugin<Project> {
Logger.info("Syncing with template repository: ${OnlineUtils.TEMPLATE_REPO}")
syncConfig.forEach { (file, cfg) ->
try {
val templateProperties = fetchTemplateProperties(file)
val templateProperties = fetchTemplateProperties(file, cfg.path)
val localProperties = Loader.loadPropertyFromFile(file)

val mergedProperties = mergeProperties(localProperties, templateProperties, cfg)
if (foundUpdate) {
updateLocalPropertiesFile(file, mergedProperties)
updateLocalPropertiesFile(cfg.path, file, mergedProperties)
Logger.info("Synchronized properties for '$file'")
} else {
Logger.info("No changes detected for '$file'")
Expand All @@ -75,8 +80,8 @@ class PropSync : Plugin<Project> {
}
}

private fun fetchTemplateProperties(fileName: PropertyFile): Properties {
val url = "${OnlineUtils.GITHUB_RAW_URL}/${OnlineUtils.TEMPLATE_REPO}/${OnlineUtils.TEMPLATE_BRANCH}/buildSrc/src/main/resources/$fileName"
private fun fetchTemplateProperties(fileName: PropertyFile, path: String): Properties {
val url = "${OnlineUtils.GITHUB_RAW_URL}/${OnlineUtils.TEMPLATE_REPO}/${OnlineUtils.TEMPLATE_BRANCH}/$path$fileName"
val properties = Properties()
val content = OnlineUtils.fetchFileContent(url) ?: throw Exception("Failed to fetch content from $url")
properties.load(ByteArrayInputStream(content.toByteArray()))
Expand Down Expand Up @@ -110,8 +115,8 @@ class PropSync : Plugin<Project> {
return merged
}

private fun updateLocalPropertiesFile(fileName: PropertyFile, properties: Properties) {
val buildSrcDirectory = project.rootProject.file("buildSrc/src/main/resources")
private fun updateLocalPropertiesFile(path: String, fileName: PropertyFile, properties: Properties) {
val buildSrcDirectory = project.rootProject.file(path.removeSuffix("/"))
val propertyFile = File(buildSrcDirectory, fileName)
if (propertyFile.exists().not()) {
return Logger.warn("Property file '$fileName' does not exist at ${propertyFile.absolutePath}, skipping update.")
Expand All @@ -135,6 +140,7 @@ class PropSync : Plugin<Project> {
existingLines.forEach {
when {
it.startsWith("#") || it.trim().isEmpty() -> lines.add(it)

it.contains("=") -> {
val key = it.substringBefore("=").trim()
val newValue = properties.getProperty(key)
Expand All @@ -147,6 +153,7 @@ class PropSync : Plugin<Project> {
updatedKeys.add(key)
} ?: lines.add(it) // Keep existing line if key not in new properties
}

else -> lines.add(it)
}
}
Expand Down
Loading