Skip to content

Commit

Permalink
Configure mod-publish-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Sep 2, 2024
1 parent 55e6262 commit c1f5c12
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import me.modmuss50.mpp.ReleaseType

plugins {
id("xyz.jpenilla.quiet-architectury-loom")
id("me.modmuss50.mod-publish-plugin") version "0.7.2" apply false
}

/*
Expand Down Expand Up @@ -97,6 +100,30 @@ subprojects {
ideConfigGenerated true
// property "mixin.debug", "true"
}

plugins.apply("me.modmuss50.mod-publish-plugin")

publishMods {
file = remapJar.archiveFile
if (project.version.contains("-beta.")) {
type = ReleaseType.BETA
} else {
type = ReleaseType.STABLE
}
changelog = providers.environmentVariable("RELEASE_NOTES")

modrinth {
projectId = "<MODRINTH_PROJECT_ID>" // TODO
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
minecraftVersions = [rootProject.minecraft_version]
}

curseforge {
projectId = "<CF_PROJECT_ID>" // TODO
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
minecraftVersions = [rootProject.minecraft_version]
}
}
}

loom.runs.all {
Expand Down
19 changes: 19 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ shadowJar {
relocate 'org.yaml.snakeyaml', 'ca.spottedleaf.moonrise.libs.org.yaml.snakeyaml'
}

publishMods {
modLoaders = ["fabric"]

modrinth {
incompatible(
"notenoughcrashes",
"starlight",
"c2me-fabric"
)
}
curseforge {
incompatible(
"not-enough-crashes",
"starlight",
"c2me-fabric"
)
}
}

// Setup a run with lithium for compatibility testing
sourceSets.create("lithium")
configurations.create("lithium")
Expand Down
21 changes: 21 additions & 0 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,24 @@ shadowJar {
}

Aw2At.setup(getProject(), tasks.remapJar)

publishMods {
modLoaders = ["neoforge"]

modrinth {
incompatible(
"notenoughcrashes",
"starlight-forge",
"canary",
"radium"
)
}
curseforge {
incompatible(
"not-enough-crashes-forge",
"starlight-forge",
"canary",
"radium-reforged"
)
}
}
4 changes: 4 additions & 0 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ versionRange = "[1.21,1.21.2)"
ordering = "NONE"
side = "BOTH"

[[dependencies.moonrise]]
modId = "notenoughcrashes"
type = "incompatible"

[[dependencies.moonrise]]
modId = "starlight"
type = "incompatible"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ public void saveAllChunks(final boolean flush, final boolean shutdown, final boo
++savedPoi;
++saved;
}
if (holder.getCurrentChunk() instanceof LevelChunk levelChunk) {
holder.world.unload(levelChunk);
}
}
} catch (final Throwable thr) {
LOGGER.error("Failed to save chunk (" + holder.chunkX + "," + holder.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'", thr);
Expand Down

0 comments on commit c1f5c12

Please sign in to comment.