Skip to content

Commit

Permalink
a bit of maven publishing cleanup, changelog updated
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed May 4, 2024
1 parent a4615cf commit 2cb10ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Changes are in reverse chronological order; newest changes at the top.

### [12.3.3]

* Router fake player will now accept XP given to it, and use it to create experience orbs near the router
* Items which directly grant experience to the player when used can now be used by Activator Modules (which use a fake player)
* Experience so granted is dropped as experience orbs next to the router
* Some API improvements, thanks to @Matyrobbrt - no player-visible changes here; intended to ease creation of addon mods

### [12.3.2]

Expand Down
22 changes: 8 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ plugins {
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

ext.releaseTag = providers.environmentVariable("TAG").orElse("").toString()
ext.isAlpha = ext.releaseTag.contains("alpha")
ext.isBeta = ext.releaseTag.contains("beta")
def relType = ext.isAlpha ? "alpha" : (ext.isBeta ? "beta" : "release")
ext {
releaseTag = providers.environmentVariable("TAG").orElse("").get()
isAlpha = ext.releaseTag.contains("alpha")
isBeta = ext.releaseTag.contains("beta")
}

// All jar files from this folder will be added automatically as runtime-only mod dependencies
def extraModsDir = "extra-mods-${minecraft_version}"
Expand Down Expand Up @@ -141,7 +142,7 @@ tasks.withType(ProcessResources).configureEach {
}
}

def snapExt = ext.releaseTag == "" ? "-SNAPSHOT" : ""
def snapExt = ext.releaseTag.isEmpty() ? "-SNAPSHOT" : ""
publishing {
publications {
register('mavenJava', MavenPublication) {
Expand Down Expand Up @@ -172,19 +173,12 @@ tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

Closure<ReleaseType> getReleaseType = { type ->
switch(type) {
case "alpha": return ReleaseType.ALPHA
case "beta": return ReleaseType.BETA
default: return ReleaseType.STABLE
}
}

def releaseType = ext.isAlpha ? ReleaseType.ALPHA : (ext.isBeta ? ReleaseType.BETA : ReleaseType.STABLE)
publishMods {
dryRun = providers.environmentVariable("CURSEFORGE_TOKEN").getOrNull() == null
changelog = providers.environmentVariable("CHANGELOG").orElse("dryrun")
version = mod_version
type = getReleaseType(relType)
type = releaseType
file = jar.archiveFile
displayName = "${mod_name} ${mod_version} MC-${minecraft_version}"
modLoaders.add("neoforge")
Expand Down

0 comments on commit 2cb10ea

Please sign in to comment.