Skip to content

Commit

Permalink
Stonecutterify!
Browse files Browse the repository at this point in the history
  • Loading branch information
IMB11 committed Jun 29, 2024
1 parent c572097 commit a21a3ab
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 47 deletions.
57 changes: 27 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ plugins {
id "org.quiltmc.gradle.licenser" version "2.0.1"
}

version = property("mod.version") + "+" + "1.20.1"
version = property("mod.version") + "+" + stonecutter.current.version
group = "dev.imb11"

base {
archivesName = property("mod.name")
}

license {
rule file("./HEADER")
rule rootProject.file("./HEADER")
include '**/*.java'
}

Expand Down Expand Up @@ -46,55 +46,52 @@ repositories {
}
}

//if (stonecutter.current.active) { // run configs for non-active version would be invalid
// loom {
// runConfigs.all {
// ideConfigGenerated = true // generate IDE tasks for running client, server and testmod, datagen if those are present
// runDir "../../run" // use a global run directory for all versions
// }
// }
//}
if (stonecutter.current.active) { // run configs for non-active version would be invalid
loom {
runConfigs.all {
ideConfigGenerated = true // generate IDE tasks for running client, server and testmod, datagen if those are present
runDir "../../run" // use a global run directory for all versions
}
}
}

loom {
accessWidenerPath = file("src/main/resources/skinshuffle.accesswidener")
accessWidenerPath = getRootProject().file("src/main/resources/aw/" + stonecutter.current.version + ".accesswidener")
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.'deps.yarn'}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.'deps.loader'}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.'deps.fabric_api'}"
minecraft "com.mojang:minecraft:${stonecutter.current.version}"
mappings "net.fabricmc:yarn:${property('deps.yarn')}:v2"
modImplementation "net.fabricmc:fabric-loader:${property('deps.loader')}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${property('deps.fabric_api')}"

modLocalRuntime modCompileOnly("com.terraformersmc:modmenu:${project.'runtime.modmenu'}")
modLocalRuntime modCompileOnly("com.terraformersmc:modmenu:${property('runtime.modmenu')}")

include implementation('com.konghq:unirest-java:3.11.09:standalone')

include modImplementation("dev.lambdaurora:spruceui:${project.'deps.spruceui'}")
include modImplementation("maven.modrinth:cicada:0.8.1+1.20.1")
include modImplementation("dev.isxander:yet-another-config-lib:${project.yacl_version}")
include modImplementation("dev.lambdaurora:spruceui:${property('deps.spruceui')}")
include modImplementation("maven.modrinth:cicada:${property('deps.cicada')}")
include modImplementation("dev.isxander:yet-another-config-lib:${property('deps.yacl')}")

include implementation("org.jsoup:jsoup:${project.'deps.jsoup'}")
include implementation("org.jsoup:jsoup:1.16.1")
include implementation("org.mineskin:java-client:+")
include implementation("commons-validator:commons-validator:1.7")

modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.0")
}

processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.'deps.loader'
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version,
"loader_version": project.'deps.loader',
"target_minecraft": project.'mod.target'
filesMatching('fabric.mod.json') {
expand 'mod_version': version,
'target_minecraft': property('mod.target'),
'target_yacl': property('deps.yacl'),
'target_cicada': property('deps.cicada'),
'minecraft_version': stonecutter.current.version
}
}

java {
var version = JavaVersion.VERSION_17
var version = stonecutter.eval(stonecutter.current.version, ">1.20.4") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_17

sourceCompatibility = version
targetCompatibility = version
Expand Down
19 changes: 3 additions & 16 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx4G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
deps.yarn=1.20.1+build.10

deps.loader=0.15.11
# Mod Properties
mod.target=>=1.20 <=1.20.1
mod.version=2.0.0+1.20.1
mod.name=SkinShuffle
# Dependencies
# check this on https://modmuss50.me/fabric.html
deps.fabric_api=0.92.2+1.20.1
deps.spruceui=5.0.0+1.20
deps.jsoup=1.16.1
deps.cvurlio=1.5.1
runtime.modmenu=7.2.2
yacl_version=3.5.0+1.20.1-fabric
mod.version=2.0.0
mod.name=SkinShuffle
16 changes: 16 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ pluginManagement {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
url = "https://maven.kikugie.dev/releases"
}
gradlePluginPortal()
}
}

plugins {
id "dev.kikugie.stonecutter" version "0.4.1"
}

stonecutter {
shared {
versions '1.20.4', '1.20.1'
vcsVersion '1.20.1'
}

create rootProject
}
File renamed without changes.
13 changes: 13 additions & 0 deletions src/main/resources/aw/1.20.4.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
accessWidener v1 named

#accessible class net/minecraft/client/texture/ResourceTexture$TextureData
#accessible method net/minecraft/client/QuickPlay startSingleplayer (Lnet/minecraft/client/MinecraftClient;Ljava/lang/String;)V
#accessible method net/minecraft/client/QuickPlay startMultiplayer (Lnet/minecraft/client/MinecraftClient;Ljava/lang/String;)V
#accessible method net/minecraft/client/QuickPlay startRealms (Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/realms/RealmsClient;Ljava/lang/String;)V
#accessible class net/minecraft/client/toast/ToastManager$Entry
#accessible class net/minecraft/server/world/ThreadedAnvilChunkStorage$EntityTracker
#accessible field net/minecraft/server/world/ThreadedAnvilChunkStorage entityTrackers Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
#accessible field net/minecraft/server/world/ThreadedAnvilChunkStorage$EntityTracker entry Lnet/minecraft/server/network/EntityTrackerEntry;
#accessible field net/minecraft/server/world/ThreadedAnvilChunkStorage$EntityTracker listeners Ljava/util/Set;
#accessible method net/minecraft/client/gui/widget/ClickableWidget drawScrollableText (Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;IIIII)V
#accessible method net/minecraft/client/gui/widget/CyclingButtonWidget <init> (IIIILnet/minecraft/text/Text;Lnet/minecraft/text/Text;ILjava/lang/Object;Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Values;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/client/gui/widget/CyclingButtonWidget$UpdateCallback;Lnet/minecraft/client/option/SimpleOption$TooltipFactory;Z)V
4 changes: 3 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "MIT",
"icon": "assets/skinshuffle/icon.png",
"accessWidener": "skinshuffle.accesswidener",
"accessWidener": "${minecraft_version}.accesswidener",
"environment": "*",
"entrypoints": {
"client": [
Expand All @@ -32,6 +32,8 @@
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*",
"yacl": ">=${target_yacl}",
"cicada": ">=${target_cicada}",
"minecraft": "${target_minecraft}"
}
}
7 changes: 7 additions & 0 deletions stonecutter.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins.apply "dev.kikugie.stonecutter"
stonecutter.active "1.20.1" /* [SC] DO NOT EDIT */

stonecutter.registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
setGroup "project"
ofTask "build"
}
10 changes: 10 additions & 0 deletions versions/1.20.1/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
runtime.modmenu=7.2.2

mod.target=>=1.20 <=1.20.1

deps.spruceui=5.0.0+1.20
deps.cicada=0.8.1+1.20.1
deps.yacl=3.5.0+1.20.1-fabric

deps.fabric_api=0.92.2+1.20.1
deps.yarn=1.20.1+build.10
10 changes: 10 additions & 0 deletions versions/1.20.4/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
runtime.modmenu=7.2.2

mod.target=>=1.20.3 <=1.20.4

deps.spruceui=5.0.3+1.20.2
deps.cicada=0.8.1+1.20.2-1.20.4
deps.yacl=3.5.0+1.20.4-fabric

deps.fabric_api=0.97.1+1.20.4
deps.yarn=1.20.4+build.3

0 comments on commit a21a3ab

Please sign in to comment.