Skip to content

Commit

Permalink
Update for 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
grondag committed Jun 4, 2022
1 parent eecd1a4 commit 73365b7
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 50 deletions.
15 changes: 7 additions & 8 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ buildscript {
}

plugins {
id 'fabric-loom' version '0.10.63'
id 'fabric-loom' version '0.12.42'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'org.ajoberstar.grgit' version '4.1.1'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'checkstyle'
id 'com.modrinth.minotaur' version '1.2.1'
id 'com.modrinth.minotaur' version '2.2.0'
}

ext.platform_name = 'fabric'
ext.loader_version = '0.12.11'
ext.fabric_version = '0.44.0+1.18'
ext.loader_version = '0.14.6'
ext.fabric_version = '0.53.4+1.18.2'

apply from: '../project_common.gradle'
apply from: 'project.gradle'
Expand Down Expand Up @@ -58,7 +58,6 @@ if (project.build_fat_jar) {
input = jar.archiveFile
archiveFileName = "${archivesBaseName}-${project.version}-slim.jar"
addNestedDependencies = false
remapAccessWidener = true
}

build.dependsOn remapMavenJar
Expand Down Expand Up @@ -144,7 +143,7 @@ task github(dependsOn: build) {

import com.modrinth.minotaur.TaskModrinthUpload

task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after build!
modrinth {
if (project.hasProperty("modrinth_token") && project.hasProperty("modrinth_id")) {
token = project.modrinth_token
projectId = project.modrinth_id
Expand All @@ -153,7 +152,7 @@ task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after buil
versionType = project.release_type
// On fabric, use 'remapJar' instead of 'jar'
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
addGameVersion(project.minecraft_version) // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
addLoader(project.platform_name)
gameVersions = ["${project.minecraft_version}"]
loaders = ["${project.platform_name}"] // Must also be an array - no need to specify this if you're using Loom
}
}
16 changes: 8 additions & 8 deletions fabric/project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ configurations {
dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modIncludeImplementation("grondag:exotic-matter-fabric-mc118:3.0.431:fat")
modIncludeImplementation("io.vram:dtklib:1.0.3")
modIncludeImplementation("io.vram:modkeys-fabric-mc118:1.0.8")
modIncludeImplementation("grondag:exotic-matter-fabric-mc118:3.0.435:fat")
modIncludeImplementation("io.vram:dtklib:1.0.6")
modIncludeImplementation("io.vram:modkeys-fabric-mc118:1.0.9")

modApi "dev.architectury:architectury-fabric:3.2.60"
modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:7.1.357"
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:7.1.357"
modCompileOnly "com.terraformersmc:modmenu:3.0.1"
modRuntimeOnly "com.terraformersmc:modmenu:3.0.1"
modApi "dev.architectury:architectury-fabric:4.4.56"
modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:8.2.463"
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:8.2.463"
modCompileOnly "com.terraformersmc:modmenu:3.2.2"
modRuntimeOnly "com.terraformersmc:modmenu:3.2.2"
}

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
}
],
"depends": {
"fabricloader": ">=0.12.11",
"fabric": "*",
"minecraft": "1.18.1",
"fabricloader": ">=0.14.6",
"minecraft": ">=1.18.2",
"architectury": ">=4.4.56",
"java": ">=17",
"exotic-matter": "*"
}
Expand Down
55 changes: 28 additions & 27 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,25 @@ buildscript {
}

plugins {
id 'dev.architectury.loom' version '0.10.0-SNAPSHOT'
id 'dev.architectury.loom' version '0.12.0-SNAPSHOT'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'org.ajoberstar.grgit' version '4.1.1'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'checkstyle'
id 'com.modrinth.minotaur' version '1.2.1'
id 'com.modrinth.minotaur' version '2.2.0'
id "com.github.johnrengelman.shadow" version "7.0.0" apply false
}

ext.platform_name = 'forge'
ext.forge_version = '39.0.8'
ext.forge_version = '40.1.14'

configurations {
bundle { transitive = false }
implementation.extendsFrom bundle
}

apply from: '../project_common.gradle'
apply from: 'project.gradle'
apply from: '../gruntle_common.gradle'

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
mappings loom.officialMojangMappings()
}

loom {
mixin.defaultRefmapName = project.mod_name + "-refmap.json"
silentMojangMappingsLicense()
}

processResources {
inputs.property "version", project.version

filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}

if (project.build_fat_jar) {
apply plugin: 'com.github.johnrengelman.shadow'
Expand All @@ -70,6 +49,28 @@ if (project.build_fat_jar) {
build.dependsOn shadowJar
}

apply from: 'project.gradle'
apply from: '../gruntle_common.gradle'

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
mappings loom.officialMojangMappings()
}

loom {
mixin.defaultRefmapName = project.mod_name + "-refmap.json"
silentMojangMappingsLicense()
}

processResources {
inputs.property "version", project.version

filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down Expand Up @@ -139,7 +140,7 @@ task github(dependsOn: build) {

import com.modrinth.minotaur.TaskModrinthUpload

task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after build!
modrinth {
if (project.hasProperty("modrinth_token") && project.hasProperty("modrinth_id")) {
token = project.modrinth_token
projectId = project.modrinth_id
Expand All @@ -148,7 +149,7 @@ task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after buil
versionType = project.release_type
// On fabric, use 'remapJar' instead of 'jar'
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
addGameVersion(project.minecraft_version) // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
addLoader(project.platform_name)
gameVersions = ["${project.minecraft_version}"]
loaders = ["${project.platform_name}"] // Must also be an array - no need to specify this if you're using Loom
}
}
4 changes: 2 additions & 2 deletions gruntle_common.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext.mc_tag = 'mc118'
ext.minecraft_version = '1.18.1'
ext.release_version = '1.18.1'
ext.minecraft_version = '1.18.2'
ext.release_version = '1.18.2'

project.archivesBaseName = project.mod_name + "-" + project.platform_name + "-" + project.mc_tag

Expand Down
4 changes: 2 additions & 2 deletions upload.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if output=$(git status --porcelain) && [ -z "$output" ]; then
echo "Uploading to mod distribution sites"
cd fabric
../gradlew curseforge publishModrinth
../gradlew curseforge modrinth --rerun-tasks
cd ..

cd forge
../gradlew curseforge publishModrinth
../gradlew curseforge modrinth --rerun-tasks
cd ..
else
echo "Git has uncommitted changes - upload to mod distribution sites cancelled."
Expand Down

0 comments on commit 73365b7

Please sign in to comment.