From 54fa6d106f2310e29ed3003cf40b5eb265ffc8b6 Mon Sep 17 00:00:00 2001 From: luiz-otavio Date: Sun, 27 Feb 2022 08:10:53 -0300 Subject: [PATCH] chore: add shade configuration --- build.gradle | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7cd22a284..508e5cc5d 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,11 @@ minecraft { sourceCompatibility = 1.8 targetCompatibility = 1.8 +configurations { + shade + compile.extendsFrom shade +} + dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. @@ -42,7 +47,7 @@ dependencies { // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html - compile 'com.github.luben:zstd-jni:1.5.2-2' + shade 'com.github.luben:zstd-jni:1.5.2-2' } processResources @@ -69,4 +74,10 @@ tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } -sourceSets {main { output.resourcesDir = output.classesDir }} +jar { + configurations.shade.each { dep -> + from(project.zipTree(dep)) { + exclude 'META-INF', 'META-INF/**' + } + } +} \ No newline at end of file