Skip to content

Commit

Permalink
Updated for 1.18
Browse files Browse the repository at this point in the history
- Updated SkinFixer NMS code for 1.18 compatibility while maintaining backwards compatibility
- Close #19
- Removed metrics
- Updated to Gradle 7.3
  • Loading branch information
TobiasDeBruijn committed Dec 2, 2021
1 parent 944cb1d commit e132f10
Show file tree
Hide file tree
Showing 21 changed files with 423 additions and 661 deletions.
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,32 @@ all: releasejar
RUST_SOURCE_FILES := $(shell find lib/src -type f)

# Release - Linux x86_64 Xenial
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-xenial.so: ${RUST_SOURCE_FILES}
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-xenial-builder release
mv lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-xenial.so

# Release - Linux x86_64 Focal
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-focal.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code" docker-registry.k8s.array21.dev/rust-amd64-focal-builder release
mv lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-focal.so

# Release - Linux x86_64 Bionic
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-bionic.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code" docker-registry.k8s.array21.dev/rust-amd64-bionic-builder release
mv lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-bionic.so

# Release - Linux aarch64
lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/aarch64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-aarch64-focal-builder release

# Release - Linux armhf
lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/arm-unknown-linux-gnueabihf/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-armhf-focal-builder release

# Release - Windows x86_64
lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll: ${RUST_SOURCE_FILES}
sudo chown ${USER}:${USER} -R lib/
sudo chmod a+rwx -R lib/
mkdir -p lib/target/x86_64-pc-windows-gnu/release
cd lib; \
cargo build --release --target x86_64-pc-windows-gnu
cp lib/target/x86_64-pc-windows-gnu/release/skinfixer.dll lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll

# Release - Darwin x86_64
lib/target/x86_64-apple-darwin/release/libskinfixer.dylib: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-apple-darwin/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-darwin-builder release

# Debug - Linux x86_64
Expand All @@ -50,6 +46,7 @@ lib/target/arm-unknown-linux-gnueabihf/debug/libskinfixer.so: ${RUST_SOURCE_FILE

# Debug - Windows x86_64
lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll: ${RUST_SOURCE_FILES}
sudo chmod -R a+rwx lib/
cd lib; \
cargo build --target x86_64-pc-windows-gnu
cp lib/target/x86_64-pc-windows-gnu/debug/skinfixer.dll lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll
Expand Down
29 changes: 6 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ allprojects {
mavenCentral()
maven{ url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
maven{ url "https://oss.sonatype.org/content/repositories/snapshots" }
maven{ url 'https://jitpack.io' }
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
mavenLocal()
}

processResources {
Expand All @@ -35,9 +35,9 @@ allprojects {
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'

implementation 'com.github.TheDutchMC:HttpLib:1.1'
implementation 'dev.array21:httplib:1.2.2'
implementation 'dev.array21:classvalidator:1.0.0'
implementation 'dev.array21:pluginstatlib:1.0.5'
implementation 'dev.array21:bukkit-reflection-util:1.1.1'

// JDA and related dependencies
implementation 'org.slf4j:slf4j-log4j12:1.7.29'
Expand Down Expand Up @@ -81,33 +81,16 @@ task copyDependenciesDebug() {
}

task copyDependenciesRelease() {
dependsOn('copyLinuxLibraryReleaseX86Focal')
dependsOn('copyLinuxLibraryReleaseX86Bionic')
dependsOn('copyLinuxLibraryReleaseX86Xenial')

dependsOn('copyLinuxLibraryReleaseX86')
dependsOn('copyLinuxLibraryReleaseAarch64')
dependsOn('copyLinuxLibraryReleaseArmhf')

dependsOn('copyDarwinLibraryReleaseX86')

dependsOn('copyWindowsLibraryRelease')
}

// Linux X86 Focal - Release
task copyLinuxLibraryReleaseX86Focal(type: Copy) {
from "$rootDir/lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-focal.so"
into "$buildDir/resources/main/x86_64/linux"
}

// Linux X86 Bionic - Release
task copyLinuxLibraryReleaseX86Bionic(type: Copy) {
from "$rootDir/lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-bionic.so"
into "$buildDir/resources/main/x86_64/linux"
}

// Linux X86 Xenial - Release
task copyLinuxLibraryReleaseX86Xenial(type: Copy) {
from "$rootDir/lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-xenial.so"
task copyLinuxLibraryReleaseX86(type: Copy) {
from "$rootDir/lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so"
into "$buildDir/resources/main/x86_64/linux"
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pluginVersion = 1.7.1
pluginVersion = 1.7.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e132f10

Please sign in to comment.