Skip to content

Commit

Permalink
Update from template for gradle 8.11.1, loom 1.9, and Preprocessor; a…
Browse files Browse the repository at this point in the history
…nd add 1.21.4 / update versions for 1.21 / 1.21.3
  • Loading branch information
sakura-ryoko committed Dec 4, 2024
1 parent b139693 commit 1865f2c
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 46 deletions.
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id 'maven-publish'
id 'fabric-loom' version '1.8-SNAPSHOT' apply false
id 'com.replaymod.preprocess' version '8de9ff8bf3'
id 'fabric-loom' version '1.9-SNAPSHOT' apply false
// https://github.com/ReplayMod/preprocessor
// https://github.com/Fallen-Breath/preprocessor
id 'com.replaymod.preprocess' version '9d21b334a7'
}

preprocess {
Expand All @@ -21,6 +22,7 @@ preprocess {
def mc1210 = createNode('1.21.0', 1_21_00, 'yarn')
def mc1211 = createNode('1.21.1', 1_21_01, 'yarn')
def mc1213 = createNode('1.21.3', 1_21_03, 'yarn')
def mc1214 = createNode('1.21.4', 1_21_04, 'yarn')

// mapping difference map
// base 1194 -> 1193 -> 1192 ->1190-> 118 -> 117 -> 116
Expand All @@ -31,6 +33,7 @@ preprocess {
mc1210.link(mc1206, file('versions/mapping-1.21.0-1.20.6.txt'))
mc1211.link(mc1210, file('versions/mapping-1.21.1-1.21.0.txt'))
mc1213.link(mc1211, file('versions/mapping-1.21.3-1.21.1.txt'))
mc1214.link(mc1213, file('versions/mapping-1.21.4-1.21.3.txt'))
//mc1194.link(mc1193, file('versions/mapping-1.19.4-1.19.3.txt'))
//mc1193.link(mc1192, file('versions/mapping-1.19.3-1.19.2.txt'))
//mc1192.link(mc1190, file('versions/mapping-1.19.2-1.19.0.txt'))
Expand Down
62 changes: 29 additions & 33 deletions common.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
apply plugin: 'maven-publish'
apply plugin: 'fabric-loom'
apply plugin: 'com.replaymod.preprocess'

int mcVersion = project.mcVersion

preprocess {
mcVersion = vars.get()["MC"] as Integer
}

String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json'
JavaVersion JAVA_COMPATIBILITY
if (mcVersion >= 12005) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_21
} else if (mcVersion >= 11800) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_17
} else if (mcVersion >= 11700) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_16
} else {
JAVA_COMPATIBILITY = JavaVersion.VERSION_1_8
}
JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY
//preprocess {
//mcVersion = vars.get()["MC"] as Integer
//}

repositories {
mavenCentral()
Expand All @@ -32,6 +18,7 @@ repositories {
maven {
url "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1"
}
//maven { url 'https://maven.fallenbreath.me/releases' }
}

// https://github.com/FabricMC/fabric-loader/issues/783
Expand Down Expand Up @@ -78,12 +65,25 @@ dependencies {
//modImplementation "fi.dy.masa.litematica:litematica-fabric-${project.minecraft_version_out}:${project.litematica_version}"
}

// // [FEATURE] MIXIN_AUDITOR
// [FEATURE] MIXIN_AUDITOR
//modRuntimeOnly 'me.fallenbreath:mixin-auditor:0.1.0'
//include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}"))
include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}")))
//include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}")))
}

String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json'
JavaVersion JAVA_COMPATIBILITY
if (mcVersion >= 12005) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_21
} else if (mcVersion >= 11800) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_17
} else if (mcVersion >= 11700) {
JAVA_COMPATIBILITY = JavaVersion.VERSION_16
} else {
JAVA_COMPATIBILITY = JavaVersion.VERSION_1_8
}
JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY

loom {
def commonVmArgs = ['-Dmixin.debug.export=true', '-Dmixin.debug.countInjections=true']
runConfigs.configureEach {
Expand All @@ -92,21 +92,17 @@ loom {
runDir '../../run'
vmArgs commonVmArgs
}
// // [FEATURE] MIXIN_AUDITOR
// runs {
// def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true']
// serverMixinAudit {
// server()
// vmArgs auditVmArgs
// ideConfigGenerated false
// }
// }
// [FEATURE] MIXIN_AUDITOR
//runs {
//def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true']
//serverMixinAudit {
//server()
//vmArgs auditVmArgs
//ideConfigGenerated false
//}
//}
}

//remapJar {
//remapperIsolation = true
//}

String modVersionSuffix = ''
String artifactVersion = project.mod_version
String artifactVersionSuffix = ''
Expand Down Expand Up @@ -169,7 +165,7 @@ tasks.withType(JavaCompile).configureEach {
java {
sourceCompatibility = JAVA_COMPATIBILITY
targetCompatibility = JAVA_COMPATIBILITY
withSourcesJar()
//withSourcesJar()
}

jar {
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
archives_base_name = litematica-printer

# Global Dependencies
# https://github.com/Fallen-Breath/conditional-mixin
# conditionalmixin_version=0.6.3
# https://github.com/Fallen-Breath/conditional-mixin
#conditionalmixin_version=0.6.3

# https://github.com/LlamaLad7/MixinExtras
mixinextras_version=0.3.6
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"1.20.6",
"1.21.0",
"1.21.1",
"1.21.3"
"1.21.3",
"1.21.4"
]
}
4 changes: 2 additions & 2 deletions versions/1.21.0/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Mod Properties
# (Jitpack.io) https://github.com/sakura-ryoko/malilib
malilib_projectid = "sakura-jitpack"
malilib_fileid = 1.21-0.21.2
malilib_fileid = 1.21-0.21.5-sakura.1
# (Jitpack.io) https://github.com/sakura-ryoko/litematica
litematica_projectid = "sakura-jitpack"
litematica_fileid = 1.21-0.19.52
litematica_fileid = 1.21-0.19.54-sakura.1
essentialclient_filename = essential-client-1.20.1-1.3.6.jar
4 changes: 2 additions & 2 deletions versions/1.21.1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Mod Properties
# (Jitpack.io) https://github.com/sakura-ryoko/malilib
malilib_projectid = "sakura-jitpack"
malilib_fileid = 1.21-0.21.2
malilib_fileid = 1.21-0.21.5-sakura.1
# (Jitpack.io) https://github.com/sakura-ryoko/litematica
litematica_projectid = "sakura-jitpack"
litematica_fileid = 1.21-0.19.52
litematica_fileid = 1.21-0.19.54-sakura.1
essentialclient_filename = essential-client-1.20.1-1.3.6.jar
4 changes: 2 additions & 2 deletions versions/1.21.3/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Mod Properties
# (Jitpack.io) https://github.com/sakura-ryoko/malilib
malilib_projectid = "sakura-jitpack"
malilib_fileid = 1.21.3-0.22.0
malilib_fileid = 1.21.3-0.22.3-sakura.1
# (Jitpack.io) https://github.com/sakura-ryoko/litematica
litematica_projectid = "sakura-jitpack"
litematica_fileid = 1.21.3-0.20.0
litematica_fileid = 1.21.3-0.20.2-sakura.1
essentialclient_filename = essential-client-1.20.1-1.3.6.jar
22 changes: 22 additions & 0 deletions versions/1.21.4/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.1
fabricapi_version=0.110.5+1.21.4
minecraft_version_out = 1.21.4

# Fabric Mod Metadata
minecraft_dependency=1.21.4

# Build Information
# The target mc versions for the mod during mod publishing, separated with \n
game_versions=1.21.4

# Mod Properties
# (Jitpack.io) https://github.com/sakura-ryoko/malilib
malilib_projectid = "sakura-jitpack"
malilib_fileid = 1.21.4-0.23.0-sakura.1
# (Jitpack.io) https://github.com/sakura-ryoko/litematica
litematica_projectid = "sakura-jitpack"
litematica_fileid = 1.21.4-0.21.0-sakura.1
essentialclient_filename = essential-client-1.20.1-1.3.6.jar
Empty file.

0 comments on commit 1865f2c

Please sign in to comment.