mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
build: use multi-version for fabric 1.21.1/4
This commit is contained in:
1 parent
c31a382093
commit
23fc30cf84
22 files changed
+198
-63
No files matched your search
@@ -53,15 +53,19 @@ jobs:
|
||||
changelog: ${{ github.event.head_commit.message }}
|
||||
distro-names: |
|
||||
paper
|
||||
fabric-1.21.1
|
||||
fabric-1.21.4
|
||||
distro-groups: |
|
||||
paper
|
||||
fabric
|
||||
fabric
|
||||
distro-descriptions: |
|
||||
Paper
|
||||
Fabric 1.21.1
|
||||
Fabric 1.21.4
|
||||
files: |
|
||||
target/HuskHomes-Paper-${{ env.version_name }}.jar
|
||||
target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
||||
target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.4.jar
|
||||
- name: 'Spigot: Publish to Modrinth & Hangar 🚰'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
@@ -108,7 +112,35 @@ jobs:
|
||||
1.21.2
|
||||
1.21.4
|
||||
java: 17
|
||||
- name: 'Fabric: Publish to Modrinth & CurseForge 🧵'
|
||||
- name: 'Fabric 1.21.1: Publish to Modrinth & CurseForge 🧵'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
if: success() || failure()
|
||||
with:
|
||||
modrinth-id: J6U9o3JG
|
||||
modrinth-featured: false
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
curseforge-id: 849217
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
dependencies: |
|
||||
fabric-api | requires | *
|
||||
dynmap | suggests | *
|
||||
bluemap | suggests | *
|
||||
pl3xmap | suggests | *
|
||||
luckperms | suggests | *
|
||||
plan | suggests | *
|
||||
impactor | suggests | *
|
||||
placeholder-api | suggests | *
|
||||
files-primary: target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
||||
name: HuskHomes (Fabric) v${{ env.version_name }}
|
||||
version: ${{ env.version_name }}
|
||||
version-type: alpha
|
||||
changelog: ${{ github.event.head_commit.message }}
|
||||
loaders: |
|
||||
fabric
|
||||
game-versions: |
|
||||
1.21.1
|
||||
java: 21
|
||||
- name: 'Fabric 1.21.4: Publish to Modrinth & CurseForge 🧵'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
if: success() || failure()
|
||||
with:
|
||||
|
||||
@@ -42,15 +42,19 @@ jobs:
|
||||
changelog: ${{ github.event.release.body }}
|
||||
distro-names: |
|
||||
paper
|
||||
fabric-1.21.1
|
||||
fabric-1.21.4
|
||||
distro-groups: |
|
||||
paper
|
||||
fabric
|
||||
fabric
|
||||
distro-descriptions: |
|
||||
Paper
|
||||
Fabric 1.21.1
|
||||
Fabric 1.21.4
|
||||
files: |
|
||||
target/HuskHomes-Paper-${{ github.event.release.tag_name }}.jar
|
||||
target/HuskHomes-Fabric-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||
target/HuskHomes-Fabric-${{ github.event.release.tag_name }}+mc.1.21.4.jar
|
||||
- name: 'Spigot: Publish to Modrinth & Hangar 🚰'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
@@ -96,7 +100,34 @@ jobs:
|
||||
1.21.2
|
||||
1.21.4
|
||||
java: 17
|
||||
- name: 'Fabric: Publish to Modrinth & CurseForge 🧵'
|
||||
- name: 'Fabric 1.21.1: Publish to Modrinth & CurseForge 🧵'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
with:
|
||||
modrinth-id: J6U9o3JG
|
||||
modrinth-featured: false
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
curseforge-id: 849217
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
dependencies: |
|
||||
fabric-api | requires | *
|
||||
dynmap | suggests | *
|
||||
bluemap | suggests | *
|
||||
pl3xmap | suggests | *
|
||||
luckperms | suggests | *
|
||||
plan | suggests | *
|
||||
impactor | suggests | *
|
||||
placeholder-api | suggests | *
|
||||
files-primary: target/HuskHomes-Fabric-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||
name: HuskHomes (Fabric) v${{ github.event.release.tag_name }}
|
||||
version: ${{ github.event.release.tag_name }}
|
||||
version-type: release
|
||||
changelog: ${{ github.event.release.body }}
|
||||
loaders: |
|
||||
fabric
|
||||
game-versions: |
|
||||
1.21.1
|
||||
java: 21
|
||||
- name: 'Fabric 1.21.4: Publish to Modrinth & CurseForge 🧵'
|
||||
uses: WiIIiam278/mc-publish@hangar
|
||||
with:
|
||||
modrinth-id: J6U9o3JG
|
||||
|
||||
@@ -69,4 +69,4 @@ Translations of the plugin locales are welcome to help make the plugin more acce
|
||||
- [bStats](https://bstats.org/plugin/bukkit/HuskHomes/8430) — View plugin metrics
|
||||
|
||||
---
|
||||
© [William278](https://william278.net/), 2023. Licensed under the Apache-2.0 License.
|
||||
© [William278](https://william278.net/), 2025. Licensed under the Apache-2.0 License.
|
||||
+24
-8
@@ -4,6 +4,7 @@ plugins {
|
||||
id 'io.github.goooler.shadow' version '8.1.8'
|
||||
id 'org.cadixdev.licenser' version '0.6.1' apply false
|
||||
id 'fabric-loom' version "$fabric_loom_version" apply false
|
||||
id 'gg.essential.multi-version.root' apply false
|
||||
id 'org.ajoberstar.grgit' version '5.3.0'
|
||||
id 'maven-publish'
|
||||
id 'java'
|
||||
@@ -57,6 +58,10 @@ publishing {
|
||||
}
|
||||
|
||||
allprojects {
|
||||
if (project.name == 'fabric') {
|
||||
return
|
||||
}
|
||||
|
||||
apply plugin: 'io.github.goooler.shadow'
|
||||
apply plugin: 'org.cadixdev.licenser'
|
||||
apply plugin: 'java'
|
||||
@@ -90,7 +95,6 @@ allprojects {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.4'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
|
||||
|
||||
testCompileOnly 'org.jetbrains:annotations:26.0.1'
|
||||
}
|
||||
|
||||
@@ -113,14 +117,26 @@ allprojects {
|
||||
}
|
||||
|
||||
subprojects {
|
||||
// Ignore root fabric project (no jars)
|
||||
if (project.name == 'fabric') {
|
||||
return
|
||||
}
|
||||
|
||||
// Project naming
|
||||
version rootProject.version
|
||||
archivesBaseName = "${rootProject.name}-${project.name.capitalize()}"
|
||||
def name = "$rootProject.name"
|
||||
if (rootProject != project.parent) {
|
||||
name += "-${project.parent.name.capitalize()}"
|
||||
} else {
|
||||
name += "-${project.name.capitalize()}"
|
||||
}
|
||||
archivesBaseName = name
|
||||
|
||||
// Fabric-specific configuration
|
||||
if (['fabric'].contains(project.name)) {
|
||||
if (project.parent?.name?.equals('fabric')) {
|
||||
apply plugin: 'fabric-loom'
|
||||
compileJava.options.release.set 21
|
||||
version += "+mc.${fabric_minecraft_version}"
|
||||
version += "+mc.${project.name}"
|
||||
}
|
||||
|
||||
jar {
|
||||
@@ -133,7 +149,7 @@ subprojects {
|
||||
}
|
||||
|
||||
// API publishing
|
||||
if (['common', 'bukkit', 'fabric'].contains(project.name)) {
|
||||
if (['common', 'bukkit'].contains(project.name) || project.parent?.name?.equals('fabric')) {
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
@@ -173,12 +189,12 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if (['fabric'].contains(project.name)) {
|
||||
if (project.parent?.name?.equals('fabric')) {
|
||||
publications {
|
||||
mavenJavaFabric(MavenPublication) {
|
||||
"mavenJavaFabric_${project.name.replace('.', '_')}"(MavenPublication) {
|
||||
groupId = 'net.william278.huskhomes'
|
||||
artifactId = 'huskhomes-fabric'
|
||||
version = "$rootProject.version+${fabric_minecraft_version}"
|
||||
version = "$rootProject.version+$project.name"
|
||||
artifact remapJar
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
Whitespace-only changes.
@@ -0,0 +1,8 @@
|
||||
essential.defaults.loom.mappings=net.fabricmc:yarn:1.21.1+build.3:v2
|
||||
|
||||
fabric_loader_version=0.16.9
|
||||
fabric_api_version=0.114.0+1.21.1
|
||||
fabric_permissions_api_version=0.3.1
|
||||
fabric_adventure_platform_version=5.14.1
|
||||
fabric_impactor_api_version=5.3.0
|
||||
fabric_placeholder_api_version=2.4.1+1.21
|
||||
Whitespace-only changes.
@@ -0,0 +1,8 @@
|
||||
essential.defaults.loom.mappings=net.fabricmc:yarn:1.21.4+build.4:v2
|
||||
|
||||
fabric_loader_version=0.16.9
|
||||
fabric_api_version=0.113.0+1.21.4
|
||||
fabric_permissions_api_version=0.3.3
|
||||
fabric_adventure_platform_version=6.2.0
|
||||
fabric_impactor_api_version=5.3.0
|
||||
fabric_placeholder_api_version=2.5.1+1.21.3
|
||||
+22
-23
@@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version "$fabric_loom_version"
|
||||
id 'gg.essential.multi-version'
|
||||
id 'gg.essential.defaults'
|
||||
}
|
||||
|
||||
apply plugin: 'fabric-loom'
|
||||
loom.serverOnlyMinecraftJar()
|
||||
|
||||
repositories {
|
||||
@@ -12,21 +12,17 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${fabric_minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${fabric_yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
|
||||
modImplementation include("net.kyori:adventure-platform-fabric:${fabric_adventure_platform_version}")
|
||||
modImplementation include("me.lucko:fabric-permissions-api:${fabric_permissions_api_version}")
|
||||
modImplementation include("eu.pb4:placeholder-api:${fabric_placeholder_api_version}")
|
||||
modImplementation include("net.impactdev.impactor.api:economy:${fabric_impactor_api_version}")
|
||||
modCompileOnly "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
||||
|
||||
implementation include('org.apache.commons:commons-pool2:2.12.0')
|
||||
implementation include("redis.clients:jedis:$jedis_version")
|
||||
implementation include("org.xerial:sqlite-jdbc:$sqlite_driver_version")
|
||||
implementation include("com.mysql:mysql-connector-j:$mysql_driver_version")
|
||||
implementation include("org.mariadb.jdbc:mariadb-java-client:$mariadb_driver_version")
|
||||
implementation include("org.xerial:sqlite-jdbc:$sqlite_driver_version")
|
||||
implementation include("redis.clients:jedis:$jedis_version")
|
||||
implementation include("com.h2database:h2:$h2_driver_version")
|
||||
|
||||
compileOnly 'org.jetbrains:annotations:26.0.1'
|
||||
@@ -34,7 +30,23 @@ dependencies {
|
||||
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.36'
|
||||
|
||||
shadow project(path: ":common")
|
||||
implementation include(project(path: ":common"))
|
||||
project(":common").configurations.api.dependencies.each { dependency ->
|
||||
if (dependency.name in ['cloplib-common', 'gson']) { // skip because it already exists (e.g. in cloplib-fabric)
|
||||
return
|
||||
}
|
||||
include(dependency)
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesMatching(Arrays.asList("fabric.mod.json")) {
|
||||
expand([
|
||||
version: version,
|
||||
fabric_loader_version: fabric_loader_version,
|
||||
fabric_minecraft_version: project.name,
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
@@ -44,19 +56,6 @@ shadowJar {
|
||||
exclude('net.fabricmc:.*')
|
||||
exclude('net.kyori:.*')
|
||||
exclude '/mappings/*'
|
||||
|
||||
relocate 'org.apache.commons.io', 'net.william278.huskhomes.libraries.commons.io'
|
||||
relocate 'org.apache.commons.text', 'net.william278.huskhomes.libraries.commons.text'
|
||||
relocate 'org.apache.commons.lang3', 'net.william278.huskhomes.libraries.commons.lang3'
|
||||
relocate 'de.themoep', 'net.william278.huskhomes.libraries'
|
||||
relocate 'org.jetbrains', 'net.william278.huskhomes.libraries'
|
||||
relocate 'org.intellij', 'net.william278.huskhomes.libraries'
|
||||
relocate 'com.zaxxer', 'net.william278.huskhomes.libraries'
|
||||
relocate 'net.william278.paginedown', 'net.william278.huskhomes.libraries.paginedown'
|
||||
relocate 'net.william278.desertwell', 'net.william278.huskhomes.libraries.desertwell'
|
||||
relocate 'de.exlll', 'net.william278.huskhomes.libraries'
|
||||
relocate 'org.yaml.snakeyaml', 'net.william278.huskhomes.libraries.snakeyaml'
|
||||
relocate 'com.google.gson', 'net.william278.huskhomes.libraries.gson'
|
||||
}
|
||||
|
||||
remapJar {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
loom.platform=fabric
|
||||
|
||||
essential.defaults.loom=1
|
||||
essential.defaults.loom.fabric-loader=net.fabricmc:fabric-loader:0.16.9
|
||||
|
||||
org.gradle.daemon=false
|
||||
org.gradle.parallel=true
|
||||
org.gradle.configureoncommand=true
|
||||
org.gradle.parallel.threads=4
|
||||
org.gradle.jvmargs=-Xmx8G
|
||||
@@ -0,0 +1 @@
|
||||
1.21.4
|
||||
@@ -0,0 +1,11 @@
|
||||
plugins {
|
||||
id("gg.essential.multi-version.root")
|
||||
}
|
||||
|
||||
preprocess {
|
||||
def fabric12104 = createNode("1.21.4", 12104, "yarn")
|
||||
def fabric12101 = createNode("1.21.1", 12101, "yarn")
|
||||
|
||||
strictExtraMappings.set(true)
|
||||
fabric12101.link(fabric12104, null)
|
||||
}
|
||||
@@ -33,7 +33,11 @@ import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.fabricmc.loader.api.ModContainer;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
//#if MC==12104
|
||||
import net.kyori.adventure.platform.modcommon.MinecraftServerAudiences;
|
||||
//#else
|
||||
//$$ import net.kyori.adventure.platform.fabric.FabricServerAudiences;
|
||||
//#endif
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
@@ -95,8 +99,12 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
|
||||
.orElseThrow(() -> new RuntimeException("Failed to get Mod Container"));
|
||||
private final Map<String, Boolean> permissions = Maps.newHashMap();
|
||||
|
||||
private MinecraftServer minecraftServer;
|
||||
//#if MC==12104
|
||||
private MinecraftServerAudiences audiences;
|
||||
//#else
|
||||
//$$ private FabricServerAudiences audiences;
|
||||
//#endif
|
||||
private MinecraftServer minecraftServer;
|
||||
|
||||
private final Set<SavedUser> savedUsers = Sets.newHashSet();
|
||||
private final Set<UUID> currentlyOnWarmup = Sets.newConcurrentHashSet();
|
||||
@@ -140,7 +148,11 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
|
||||
|
||||
private void onEnable(@NotNull MinecraftServer server) {
|
||||
this.minecraftServer = server;
|
||||
//#if MC==12104
|
||||
this.audiences = MinecraftServerAudiences.of(minecraftServer);
|
||||
//#else
|
||||
//$$ this.audiences = FabricServerAudiences.of(minecraftServer);
|
||||
//#endif
|
||||
this.enable();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=${fabric_loader_version}",
|
||||
"minecraft": ">=${fabric_minecraft_version}",
|
||||
"minecraft": "${fabric_minecraft_version}",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
"suggests": {
|
||||
|
||||
+1
-9
@@ -17,12 +17,4 @@ h2_driver_version=2.3.232
|
||||
postgresql_driver_version=42.7.4
|
||||
|
||||
# Fabric settings
|
||||
fabric_loom_version=1.8-SNAPSHOT
|
||||
fabric_minecraft_version=1.21.4
|
||||
fabric_loader_version=0.16.9
|
||||
fabric_yarn_mappings=1.21.4+build.2
|
||||
fabric_api_version=0.112.0+1.21.4
|
||||
fabric_permissions_api_version=0.3.3
|
||||
fabric_adventure_platform_version=6.1.0
|
||||
fabric_impactor_api_version=5.2.4-SNAPSHOT
|
||||
fabric_placeholder_api_version=2.5.1+1.21.3
|
||||
fabric_loom_version=1.9-SNAPSHOT
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
Vendored
+2
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
# This file ensures jitpack builds HuskHomes correctly by setting the JDK to 17
|
||||
jdk:
|
||||
- 'openjdk17'
|
||||
before_install:
|
||||
- 'git clone https://github.com/WiIIiam278/HuskHomes.git --recurse-submodules'
|
||||
- 'chmod +x gradlew'
|
||||
- 'chmod +x ./.scripts/ensure-java-17'
|
||||
- 'bash ./.scripts/ensure-java-17 install'
|
||||
install:
|
||||
- 'if ! ./.scripts/ensure-java-17 use; then source ~/.sdkman/bin/sdkman-init.sh; fi'
|
||||
- 'java -version'
|
||||
- './gradlew publishToMavenLocal'
|
||||
+1
-1
@@ -48,7 +48,7 @@ tasks {
|
||||
minecraftVersion('1.21.4')
|
||||
|
||||
downloadPlugins {
|
||||
url("https://download.luckperms.net/1567/bukkit/loader/LuckPerms-Bukkit-5.4.150.jar")
|
||||
url("https://download.luckperms.net/1569/bukkit/loader/LuckPerms-Bukkit-5.4.152.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
-3
@@ -2,6 +2,15 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven { url 'https://maven.fabricmc.net/' }
|
||||
maven { url 'https://maven.architectury.dev/' }
|
||||
maven { url 'https://maven.minecraftforge.net' }
|
||||
maven { url 'https://repo.essential.gg/repository/maven-public' }
|
||||
}
|
||||
|
||||
plugins {
|
||||
def egtVersion = "0.6.5"
|
||||
id("gg.essential.defaults") version egtVersion
|
||||
id("gg.essential.multi-version.root") version egtVersion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +21,20 @@ include(
|
||||
// Paper/Spigot
|
||||
'bukkit',
|
||||
'paper',
|
||||
)
|
||||
|
||||
// Fabric
|
||||
'fabric',
|
||||
)
|
||||
|
||||
// Fabric
|
||||
include("fabric")
|
||||
project(":fabric").with {
|
||||
projectDir = file("fabric/")
|
||||
buildFileName = "root.gradle"
|
||||
}
|
||||
|
||||
file('fabric').listFiles((FileFilter) ((File file) -> file.isDirectory() && file.name ==~ /(\d+)\.(\d+)(\.(\d+))?/)).each {
|
||||
include("fabric:$it.name")
|
||||
project(":fabric:$it.name").with {
|
||||
projectDir = file("fabric/${it.name}")
|
||||
buildFileName = '../build.gradle'
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user