mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +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
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": {
|
||||
|
||||
Reference in new issue
Block a user