Merge remote-tracking branch 'architectury/1.18.2' into 1.19

This commit is contained in:
shedaniel
2022-06-16 18:45:21 +08:00
5 changed files with 65 additions and 5 deletions

View File

@@ -55,6 +55,16 @@ remapJar {
classifier null
}
task renameJarForPublication(type: Zip, dependsOn: remapJar) {
from remapJar.archiveFile.map { zipTree(it) }
extension "jar"
metadataCharset "UTF-8"
destinationDirectory = base.libsDirectory
classifier project.name
}
assemble.dependsOn renameJarForPublication
jar {
classifier "dev"
}
@@ -105,7 +115,7 @@ unifiedPublishing {
changelog = releaseChangelog()
gameVersions = ["1.19"]
gameLoaders = ["fabric", "quilt"]
mainPublication remapJar
mainPublication renameJarForPublication
relations {
depends {
curseforge = "fabric-api"

View File

@@ -68,6 +68,16 @@ remapJar {
classifier null
}
task renameJarForPublication(type: Zip, dependsOn: remapJar) {
from remapJar.archiveFile.map { zipTree(it) }
extension "jar"
metadataCharset "UTF-8"
destinationDirectory = base.libsDirectory
classifier project.name
}
assemble.dependsOn renameJarForPublication
jar {
classifier "dev"
}
@@ -118,7 +128,7 @@ unifiedPublishing {
changelog = releaseChangelog()
gameVersions = ["1.19"]
gameLoaders = ["forge"]
mainPublication remapJar
mainPublication renameJarForPublication
var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
if (CURSE_API_KEY != null) {
@@ -139,3 +149,14 @@ unifiedPublishing {
}
}
}
// Update mods.toml with the new versions automatically
// Not using processResources because it is easier to do this manually, and see it reflected immediately
afterEvaluate {
file("src/main/resources/META-INF/mods.toml").withOutputStream {
it << file("mods.toml").text
.replaceAll("@LOADER_MAJOR@", rootProject.forge_version.split("\\.")[0])
.replaceAll("@MINECRAFT_VERSION@", rootProject.architectury.minecraft)
.replaceAll("@FORGE_VERSION@", rootProject.forge_version)
}
}

29
forge/mods.toml Normal file
View File

@@ -0,0 +1,29 @@
modLoader = "javafml"
loaderVersion = "[@LOADER_MAJOR@,)"
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
license = "GNU LGPLv3"
[[mods]]
modId = "architectury"
version = "${version}"
displayName = "Architectury"
authors = "shedaniel"
description = '''
A intermediary api aimed to ease developing multiplatform mods.
'''
logoFile = "icon.png"
license = "LGPL-3"
[[dependencies.architectury]]
modId = "minecraft"
mandatory = true
versionRange = "[@MINECRAFT_VERSION@,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.architectury]]
modId = "forge"
mandatory = true
versionRange = "[@FORGE_VERSION@,)"
ordering = "NONE"
side = "BOTH"

View File

@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[38,)"
loaderVersion = "[40,)"
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
license = "GNU LGPLv3"
@@ -24,6 +24,6 @@ side = "BOTH"
[[dependencies.architectury]]
modId = "forge"
mandatory = true
versionRange = "[38.0.17,)"
versionRange = "[40.1.14,)"
ordering = "NONE"
side = "BOTH"

View File

@@ -6,7 +6,7 @@ dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
implementation project(":common")
implementation project(path: ":common", configuration: "namedElements")
}
architectury {