Skip to content

Commit

Permalink
Merge branch 'refs/heads/multi' into architectury-test
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
#	common.gradle
#	gradle.properties
#	settings.json
#	versions/1.20.4-fabric/gradle.properties
#	versions/1.20.4/gradle.properties
#	versions/1.20.6/gradle.properties
  • Loading branch information
Fallen-Breath committed May 24, 2024
2 parents ddc05cc + f20d0fa commit d0ebc4e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: step.build
name: _step.build

on:
workflow_call:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix_prep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: step.matrix_prepare
name: _step.matrix_prepare

on:
workflow_call:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ preprocess {
def mc117_fabric = createNode('1.17.1-fabric', 1_17_01, '')
def mc118_fabric = createNode('1.18.2-fabric', 1_18_02, '')
def mc119_fabric = createNode('1.19.4-fabric', 1_19_04, '')
def mc120_fabric = createNode('1.20.4-fabric', 1_20_04, '')
def mc120_fabric = createNode('1.20.6-fabric', 1_20_06, '')

def mc115_forge = createNode('1.15.2-forge' , 1_15_02, '')
def mc116_forge = createNode('1.16.5-forge' , 1_16_05, '')
def mc117_forge = createNode('1.17.1-forge' , 1_17_01, '')
def mc118_forge = createNode('1.18.2-forge' , 1_18_02, '')
def mc119_forge = createNode('1.19.4-forge' , 1_19_04, '')
def mc120_forge = createNode('1.20.4-forge' , 1_20_04, '')
def mc120_forge = createNode('1.20.6-forge' , 1_20_06, '')

mc114_fabric.link(mc115_fabric, null)
mc115_fabric.link(mc116_fabric, null)
Expand Down
30 changes: 21 additions & 9 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,31 +87,43 @@ remapJar {
remapperIsolation = true
}

String versionSuffix = ''
String modVersionSuffix = ''
String artifactVersion = project.mod_version
// detect github action environment variables
// https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
if (System.getenv("BUILD_RELEASE") != "true") {
String buildNumber = System.getenv("BUILD_ID")
versionSuffix += buildNumber != null ? ('+build.' + buildNumber) : '-SNAPSHOT'
modVersionSuffix += buildNumber != null ? ('+build.' + buildNumber) : '-SNAPSHOT'
artifactVersion += '-SNAPSHOT' // A non-release artifact is always a SNAPSHOT artifact
}
String fullModVersion = project.mod_version + versionSuffix
String finalModVersion = project.mod_version + modVersionSuffix
String fullProjectVersion, fullArtifactVersion

// Example version values:
// project.mod_version 1.0.3 (the base mod version)
// finalModVersion 1.0.3+build.88 (the actual mod version to use)
// fullProjectVersion mc1.15.2-v1.0.3+build.88 (in build output jar name)
// fullArtifactVersion mc1.15.2-v1.0.3-SNAPSHOT (maven artifact version)

group = project.maven_group
if (System.getenv("JITPACK") == "true") {
// move mc version into archivesBaseName, so jitpack will be able to organize archives from multiple subprojects correctly
base.archivesName = project.archives_base_name + '-mc' + project.minecraft_version + '-' + mod_brand
version = 'v' + fullModVersion
fullProjectVersion = 'v' + finalModVersion
fullArtifactVersion = 'v' + artifactVersion
} else {
base.archivesName = project.archives_base_name
version = 'mc' + project.minecraft_version + '-' + mod_brand + '-v' + fullModVersion
fullProjectVersion = 'mc' + project.minecraft_version + '-' + mod_brand + '-v' + finalModVersion
fullArtifactVersion = 'mc' + project.minecraft_version + '-' + mod_brand + '-v' + artifactVersion
}
version = fullProjectVersion

// See https://youtrack.jetbrains.com/issue/IDEA-296490
// if IDEA complains about "Cannot resolve resource filtering of MatchingCopyAction" and you want to know why
processResources {
inputs.property "id", project.mod_id
inputs.property "name", project.mod_name
inputs.property "version", fullModVersion
inputs.property "version", finalModVersion
inputs.property "minecraft_dependency", project.minecraft_dependency

[
Expand All @@ -124,7 +136,7 @@ processResources {
def valueMap = [
"id": project.mod_id,
"name": project.mod_name,
"version": fullModVersion,
"version": finalModVersion,
"minecraft_dependency": project.minecraft_dependency,
]
expand valueMap
Expand Down Expand Up @@ -219,8 +231,8 @@ publishing {
publications {
mavenJava(MavenPublication) {
artifactId base.archivesName.get()

from components.java
version = fullArtifactVersion
}
}

Expand All @@ -230,7 +242,7 @@ publishing {

// // [FEATURE] FALLENS_MAVEN
// maven {
// url = version.endsWith("SNAPSHOT") ? "https://maven.fallenbreath.me/snapshots" : "https://maven.fallenbreath.me/releases"
// url = fullArtifactVersion.endsWith("SNAPSHOT") ? "https://maven.fallenbreath.me/snapshots" : "https://maven.fallenbreath.me/releases"
// credentials(PasswordCredentials) {
// username = 'fallen'
// password = System.getenv("FALLENS_MAVEN_TOKEN")
Expand Down
4 changes: 2 additions & 2 deletions settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"1.17.1-fabric",
"1.18.2-fabric",
"1.19.4-fabric",
"1.20.4-fabric",
"1.20.6-fabric",

"1.15.2-forge",
"1.16.5-forge",
"1.17.1-forge",
"1.18.2-forge",
"1.19.4-forge",
"1.20.4-forge"
"1.20.6-forge"
]
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Loom Properties
# check these on https://fallen-breath.github.io/fabric-versions/?&version=1.20.4
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loom.platform=fabric

# Mod Metadata
# https://fabricmc.net/versions.html
fabric_loader_version=0.15.10
minecraft_dependency=1.20.4
minecraft_dependency=1.20.6

# Build Information
# The target mc versions for the mod during mod publishing, separated with \n
game_versions=1.20.4
game_versions=1.20.6

# Dependencies
# fabric_api_version=0.96.1+1.20.4
# fabric_api_version=0.97.8+1.20.6
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Loom Properties
# check these on https://fallen-breath.github.io/fabric-versions/?&version=1.20.4
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
# check these on https://fallen-breath.github.io/fabric-versions/?&version=1.20.6
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loom.platform=forge

# Mod Metadata
# https://files.minecraftforge.net/net/minecraftforge/forge/index_1.20.4.html
forge_version=49.0.48
minecraft_dependency=[1.20.4]
# https://files.minecraftforge.net/net/minecraftforge/forge/index_1.20.6.html
forge_version=50.0.31
minecraft_dependency=[1.20.6]

# Build Information
# The target mc versions for the mod during mod publishing, separated with \n
game_versions=1.20.4
game_versions=1.20.6

0 comments on commit d0ebc4e

Please sign in to comment.