Skip to content

Commit

Permalink
Merge pull request #6 from Liams-Services/feat/4-add-multiversion-sup…
Browse files Browse the repository at this point in the history
…port

feat(#4): Adding stonecutter
  • Loading branch information
CoasterFreakDE authored Sep 4, 2024
2 parents a08254e + 8ef4b61 commit 8fd478d
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle
**/build/
!src/**/build/
!gradle/wrapper/gradle-wrapper.jar

### Fabric ###
# Minecraft client/server files
Expand Down Expand Up @@ -87,6 +88,9 @@ fabric.properties
### Kotlin ###
# Compiled class file

### Libs ###
!libs/*

# Log file

# BlueJ files
Expand Down
15 changes: 14 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -106,6 +112,13 @@ configure<SourceSetContainer> {
}
}

if (stonecutter.current.isActive) {
rootProject.tasks.register("buildActive") {
group = "project"
dependsOn(tasks.named("build"))
}
}

// configure the maven publication
publishing {
publications {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Binary file added libs/iris-1.7.3+mc1.21.jar
Binary file not shown.
17 changes: 17 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import dev.kikugie.stonecutter.StonecutterSettings

pluginManagement {
repositories {
maven("https://maven.fabricmc.net/") {
Expand All @@ -6,3 +8,18 @@ pluginManagement {
gradlePluginPortal()
}
}

plugins {
id("dev.kikugie.stonecutter") version "0.4.4"
}

extensions.configure<StonecutterSettings> {
kotlinController = true
centralScript = "build.gradle.kts"

shared {
versions("1.21.1", "1.21")
}

create(rootProject)
}
9 changes: 9 additions & 0 deletions stonecutter.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
}
4 changes: 4 additions & 0 deletions versions/1.21.1/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions versions/1.21/gradle.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8fd478d

Please sign in to comment.