diff --git a/.gitignore b/.gitignore index 86eebd8..c2f6f8d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .gradle **/build/ !src/**/build/ +!gradle/wrapper/gradle-wrapper.jar ### Fabric ### # Minecraft client/server files @@ -87,6 +88,9 @@ fabric.properties ### Kotlin ### # Compiled class file +### Libs ### +!libs/* + # Log file # BlueJ files diff --git a/build.gradle.kts b/build.gradle.kts index 27eba51..b3333d4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,6 +32,11 @@ loom { sourceSet("client") } } + + runConfigs.all { + ideConfigGenerated(true) // Run configurations are not created for subprojects by default + runDir = "../../run" // Use a shared run folder and just create separate worlds + } } repositories { @@ -53,7 +58,8 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}") - compileOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) + + compileOnly(fileTree(mapOf("dir" to "../../libs", "include" to listOf("*.jar")))) } tasks.processResources { @@ -106,6 +112,13 @@ configure { } } +if (stonecutter.current.isActive) { + rootProject.tasks.register("buildActive") { + group = "project" + dependsOn(tasks.named("build")) + } +} + // configure the maven publication publishing { publications { diff --git a/gradle.properties b/gradle.properties index a9ebd14..82e7ced 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.21.1 -yarn_mappings=1.21.1+build.3 +minecraft_version=[VERSIONED] +yarn_mappings=[VERSIONED] loader_version=0.16.3 kotlin_loader_version=1.12.1+kotlin.2.0.20 # Mod Properties -mod_version=1.21.1 +mod_version=[VERSIONED] maven_group=com.liamxsage archives_base_name=shaderapi # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.103.0+1.21.1 +fabric_version=[VERSIONED] diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..a4b76b9 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/libs/iris-1.7.3+mc1.21.jar b/libs/iris-1.7.3+mc1.21.jar new file mode 100644 index 0000000..b2b918d Binary files /dev/null and b/libs/iris-1.7.3+mc1.21.jar differ diff --git a/settings.gradle.kts b/settings.gradle.kts index 05eb23d..8a6197a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,5 @@ +import dev.kikugie.stonecutter.StonecutterSettings + pluginManagement { repositories { maven("https://maven.fabricmc.net/") { @@ -6,3 +8,18 @@ pluginManagement { gradlePluginPortal() } } + +plugins { + id("dev.kikugie.stonecutter") version "0.4.4" +} + +extensions.configure { + kotlinController = true + centralScript = "build.gradle.kts" + + shared { + versions("1.21.1", "1.21") + } + + create(rootProject) +} \ No newline at end of file diff --git a/stonecutter.gradle.kts b/stonecutter.gradle.kts new file mode 100644 index 0000000..0a96797 --- /dev/null +++ b/stonecutter.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("dev.kikugie.stonecutter") +} +stonecutter active "1.21.1" /* [SC] DO NOT EDIT */ + +stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) { + group = "project" + ofTask("build") +} \ No newline at end of file diff --git a/versions/1.21.1/gradle.properties b/versions/1.21.1/gradle.properties new file mode 100644 index 0000000..02487d1 --- /dev/null +++ b/versions/1.21.1/gradle.properties @@ -0,0 +1,4 @@ +minecraft_version=1.21.1 +yarn_mappings=1.21.1+build.3 +mod_version=1.21.1 +fabric_version=0.103.0+1.21.1 diff --git a/versions/1.21/gradle.properties b/versions/1.21/gradle.properties new file mode 100644 index 0000000..a8fadae --- /dev/null +++ b/versions/1.21/gradle.properties @@ -0,0 +1,4 @@ +minecraft_version=1.21 +yarn_mappings=1.21+build.3 +mod_version=1.21 +fabric_version=0.102.0+1.21