Skip to content

Commit

Permalink
build: Update to ModDevGradle, bump to 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Aug 12, 2024
1 parent 1c887fa commit 78ef9a4
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 91 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Updated to Minecraft 1.21.1
- Fixed crash when saving or syncing blocks without certain content
- Fixed breaking compressed sand (and some others) only resulting in one item instead of 9
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT' apply(false)
// id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false) // this causes ForgeGradle to fail in reobf
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" // this is required for VanillaGradle and NeoForge to exist in harmony
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply(false)
id 'net.neoforged.moddev' version '0.1.110' apply(false)
id 'net.darkhax.curseforgegradle' version '1.1.18' apply(false)
id "com.modrinth.minotaur" version "2.+" apply(false)
}
Expand Down
13 changes: 13 additions & 0 deletions buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ repositories {
filter { includeGroupAndSubgroups("org.spongepowered") }
}
maven { url "https://maven.twelveiterations.com/repository/maven-public/" }
exclusiveContent {
forRepositories(
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org/'
},
maven {
name = "NeoForge"
url = 'https://maven.neoforged.net/releases'
}
)
filter { includeGroup('org.parchmentmc.data') }
}
}

dependencies {
Expand Down
17 changes: 11 additions & 6 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
plugins {
id 'multiloader-common'
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id 'net.neoforged.moddev'
}

base {
archivesName = "${mod_id}-common-${minecraft_version}"
}

minecraft {
version(minecraft_version)
def aw = file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWideners(aw)
neoForge {
neoFormVersion = neo_form_version
// Automatically enable AccessTransformers if the file exists
def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.add(at.absolutePath)
}
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}
}

Expand Down
7 changes: 5 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ plugins {

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
mappings loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
}
Expand Down Expand Up @@ -69,7 +72,7 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
modrinth {
token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none"
projectId = project.modrinth_project_id
versionType = "release"
versionType = project.modrinth_release_type
versionNumber = project.version + "+fabric-" + project.minecraft_version
uploadFile = remapJar
changelog = rootProject.file("CHANGELOG.md").text
Expand Down
4 changes: 2 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'multiloader-loader'
id 'net.minecraftforge.gradle' version '[6.0.25,6.2)'
id 'org.spongepowered.mixin'
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
id 'net.darkhax.curseforgegradle'
id "com.modrinth.minotaur"
}
Expand Down Expand Up @@ -109,7 +109,7 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
modrinth {
token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none"
projectId = project.modrinth_project_id
versionType = "release"
versionType = project.modrinth_release_type
versionNumber = project.version + "+forge-" + project.minecraft_version
uploadFile = jar
changelog = rootProject.file("CHANGELOG.md").text
Expand Down
21 changes: 12 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mod
version = 21.0.3
version = 21.1.0
mod_id = excompressum
mod_name = Ex Compressum
description=Ex Nihilo Addon. Attempts to reduce grind by adding pre-automation tools like compressed hammers.
Expand All @@ -17,29 +17,29 @@ curseforge_fabric_project_id = 241967
modrinth_project_id = mwfOGtr1

# Minecraft
minecraft_version = 1.21
minecraft_versions = 1.21
minecraft_version = 1.21.1
minecraft_versions = 1.21,1.21.1
minecraft_version_range = [1.21,)
java_version = 21

# Balm
kuma_version = [21.0,22)
balm_version = 21.0.12-SNAPSHOT
balm_version_range = [21.0.11,)
balm_version = 21.0.14-SNAPSHOT
balm_version_range = [21.0.0,)

# Forge
forge_version = 51.0.0
forge_version = 52.0.2
forge_version_range = [51,)
forge_loader_version_range = [51,)
forge_mixins=true

# NeoForge
neoforge_version = 21.0.40-beta
neoforge_version = 21.1.8
neoforge_version_range = [21-beta,)
neoforge_loader_version_range = [1,)

# Fabric
fabric_version = 0.100.1+1.21
fabric_version = 0.102.1+1.21.1
fabric_loader_version = 0.15.11

# Dependencies
Expand All @@ -55,4 +55,7 @@ theoneprobe_version=4159743
# Gradle
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
pack_format_number = 18
pack_format_number = 18
neo_form_version = 1.21.1-20240808.144430
parchment_minecraft = 1.21
parchment_version = 2024.06.23
75 changes: 31 additions & 44 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'multiloader-loader'
id 'net.neoforged.gradle.userdev' version '7.0.142'
id 'net.neoforged.moddev'
id 'net.darkhax.curseforgegradle'
id "com.modrinth.minotaur"
}
Expand All @@ -9,60 +9,47 @@ base {
archivesName = "${mod_id}-neoforge-${minecraft_version}"
}

def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
minecraft.accessTransformers.file at
}

runs {
configureEach {
// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
systemProperty 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
systemProperty 'forge.logging.console.level', 'debug'

modSource project.sourceSets.main
neoForge {
version = neoforge_version
// Automatically enable neoforge AccessTransformers if the file exists
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.add(at.absolutePath)
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}

server {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
}
runs {
configureEach {
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
ideName = "NeoForge ${it.name.capitalize()} (${project.path})"
}

// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
client {
client()
}

server {
server()
}

data {
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
// workingDirectory project.file('run-data')
data {
data()
}
}

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
implementation "net.neoforged:neoforge:${neoforge_version}"
}

apply from: rootProject.file('repositories.gradle')
apply from: 'dependencies.gradle'

Expand All @@ -83,7 +70,7 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
modrinth {
token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none"
projectId = project.modrinth_project_id
versionType = "release"
versionType = project.modrinth_release_type
versionNumber = project.version + "+neoforge-" + project.minecraft_version
uploadFile = jar
changelog = rootProject.file("CHANGELOG.md").text
Expand Down
10 changes: 1 addition & 9 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ repositories {
url = "https://jm.gserv.me/repository/maven-public/"
content {
includeGroup "info.journeymap"
includeGroup "mysticdrew"
}
}

maven {
url = 'https://jitpack.io'
content {
includeGroup "com.github.BlueMap-Minecraft"
includeGroup "com.github.mattidragon"
}
}

Expand All @@ -65,12 +65,4 @@ repositories {
includeGroup "de.siphalor"
}
}

maven {
url = "https://dl.cloudsmith.io/public/novamachina-mods/release/maven/"
content {
includeGroup "novamachina.novacore"
includeGroup "novamachina.exnihilosequentia"
}
}
}
20 changes: 4 additions & 16 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ pluginManagement {
exclusiveContent {
forRepository {
maven {
name = 'NeoForge'
url = uri("https://maven.neoforged.net/releases")
name = 'Sponge'
url = uri('https://repo.spongepowered.org/repository/maven-public')
}
}
filter {
includeGroupAndSubgroups("net.neoforged")
includeGroup("codechicken")
includeGroupAndSubgroups("org.spongepowered")
}
}
exclusiveContent {
Expand All @@ -37,17 +36,6 @@ pluginManagement {
includeGroupAndSubgroups("net.minecraftforge")
}
}
exclusiveContent {
forRepository {
maven {
name = 'Sponge Snapshots'
url = uri("https://repo.spongepowered.org/repository/maven-public")
}
}
filter {
includeGroupAndSubgroups("org.spongepowered")
}
}
}
}

Expand All @@ -57,5 +45,5 @@ plugins {

include("common")
include("fabric")
include("neoforge")
include("forge")
include("neoforge")

0 comments on commit 78ef9a4

Please sign in to comment.