Skip to content

Commit

Permalink
Fix jackson lib version mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Aug 15, 2024
1 parent 4e8eb7c commit f3ed82c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 18 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.direnv
1 change: 1 addition & 0 deletions plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run
35 changes: 19 additions & 16 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.shadow)
alias(libs.plugins.pluginyml)
alias(libs.plugins.hangar)
id("xyz.jpenilla.run-paper") version "2.3.0"
}

publishData {
Expand All @@ -16,12 +17,13 @@ publishData {
dependencies {
implementation(project(":api"))
compileOnly(libs.paper)
implementation("net.kyori:adventure-platform-bukkit:4.3.3") {
bukkitLibrary("net.kyori:adventure-platform-bukkit:4.3.3") {
exclude("org.jetbrains")
}
compileOnly(libs.bundles.fawe)
compileOnly("org.jetbrains:annotations:24.1.0")

bukkitLibrary(libs.jacksonyaml)
bukkitLibrary(libs.bundles.eldoutil)
}

Expand Down Expand Up @@ -95,22 +97,23 @@ tasks {
shadowJar {
archiveBaseName.set("schematic-sanitizer")
archiveVersion.set(publishData.getVersion())
val mapping = mapOf(
"de.eldoria.eldoutilities" to "utils",
"de.eldoria.jacksonbukkit" to "jacksonbukkit",
"org.yaml" to "yaml",
"net.kyori" to "adventure",
"com.fasterxml.jackson" to "jackson"
)
if (publishData.isPublicBuild()) {
println("relocating")
val base = "de.eldoria.schematicsanitizer.libs."
for ((pattern, name) in mapping) {
println("relocating ${pattern} to ${base}${name}")
relocate(pattern, "${base}${name}")
}

// val mapping = mapOf(
// )
// if (publishData.isPublicBuild()) {
// println("relocating")
// val base = "de.eldoria.schematicsanitizer.libs."
// for ((pattern, name) in mapping) {
// println("relocating ${pattern} to ${base}${name}")
// relocate(pattern, "${base}${name}")
// }
// }
}
runServer {
val myPlugins = runPaper.downloadPluginsSpec {
url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/FastAsyncWorldEdit-Bukkit-2.11.2-SNAPSHOT-879.jar")
}
downloadPlugins.from(myPlugins)
minecraftVersion("1.21")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ public Level getLogLevel() {

@Override
public void onPluginEnable() {
ILocalizer localizer = Localizer.create(this, "en_US");
localizer.setLocale("en_US");
ILocalizer localizer = Localizer.builder(this, "en_US")
.setIncludedLocales("en_US")
.build();
MessageSender.builder(this)
.localizer(localizer)
.prefix("<#009dff>[<#ff7300>SC<#009dff>]")
Expand Down
11 changes: 11 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> {}, ... }:

let
jdk = pkgs.jdk21;
gradle= pkgs.gradle.override { java = jdk; };
in
pkgs.mkShell
{
packages = with pkgs; [jdk gradle];
}

0 comments on commit f3ed82c

Please sign in to comment.