From 7a91e0a80d14a43119b04f3a71dc87ffee8a3c05 Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Tue, 6 Oct 2020 22:45:15 -0400 Subject: [PATCH] Start on compiling --- bootstrap/fabric/build.gradle | 30 ++++++++++++++++++++++++++++++ bootstrap/fabric/gradle.properties | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/bootstrap/fabric/build.gradle b/bootstrap/fabric/build.gradle index 059b59d42..6ea04cb5d 100644 --- a/bootstrap/fabric/build.gradle +++ b/bootstrap/fabric/build.gradle @@ -1,6 +1,7 @@ plugins { id 'fabric-loom' version '0.5-SNAPSHOT' id 'maven-publish' + id 'com.github.johnrengelman.shadow' version '6.0.0' } sourceCompatibility = JavaVersion.VERSION_1_8 @@ -23,6 +24,11 @@ dependencies { // You may need to force-disable transitiveness on them. implementation 'org.geysermc:connector:1.1.0' + shadow('org.geysermc:connector:1.1.0') { +// exclude group: 'org.w3c' +// exclude group: 'org.xml' +// exclude group: 'javax.xml' + } compileOnly 'org.projectlombok:lombok:1.18.4' annotationProcessor 'org.projectlombok:lombok:1.18.4' @@ -74,10 +80,34 @@ task sourcesJar(type: Jar, dependsOn: classes) { from sourceSets.main.allSource } +shadowJar { + configurations = [project.configurations.shadow] + //relocate 'org.apache', 'geyser.org.apache' + relocate 'org.reflections', 'geyser.org.reflections' + relocate 'org.dom4j', 'geyser.org.dom4j' + relocate 'javax.xml', 'geyser.javaxxml' + relocate 'org.xml', 'geyser.xml' + //relocate 'org.w3c', 'geyser.w3c' +} + jar { from "LICENSE" } +remapJar { + dependsOn(shadowJar) + input.set shadowJar.archiveFile.get() +} +// +//import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation +// +//task relocateShadowJar(type: ConfigureShadowRelocation) { +// target = tasks.shadowJar +// prefix = "org.geyser.platform.fabric.relocate" +//} +// +//tasks.shadowJar.dependsOn tasks.relocateShadowJar + // configure the maven publication publishing { publications { diff --git a/bootstrap/fabric/gradle.properties b/bootstrap/fabric/gradle.properties index fbcb2816c..7fe0d5d14 100644 --- a/bootstrap/fabric/gradle.properties +++ b/bootstrap/fabric/gradle.properties @@ -8,7 +8,7 @@ loader_version=0.10.1+build.209 # Mod Properties mod_version=1.0-SNAPSHOT maven_group=org.geysermc.platform -archives_base_name=fabric +archives_base_name=Geyser-Fabric # Dependencies # check this on https://modmuss50.me/fabric.html fabric_version=0.23.0+build.410-1.16