Skip to content

Commit

Permalink
relocate gson in forge-legacy to fix crash
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
DJtheRedstoner committed Sep 3, 2021
1 parent 752b848 commit b944d36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.gradle.jvm.tasks.Jar

plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
}

allprojects {
Expand Down
18 changes: 14 additions & 4 deletions forge-legacy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
}

apply plugin: "net.minecraftforge.gradle"
apply plugin: "com.github.johnrengelman.shadow"

configurations {
include { transitive = false }
Expand All @@ -31,14 +32,23 @@ dependencies {
include project(":common")
include "com.electronwill.night-config:core:3.6.4"
include "com.electronwill.night-config:toml:3.6.4"
include "com.google.code.gson:gson:2.4"
}

jar.finalizedBy("reobfJar")

jar {
from configurations.include.collect() { zipTree(it) }
enabled = false
}

shadowJar {
archiveClassifier.set("")

configurations = [project.configurations.include]

manifest.attributes(
"FMLCorePlugin": "me.djtheredstoner.devauth.forge.legacy.DevAuthLoadingPlugin"
)
}

relocate "com.google.gson", "me.djtheredstoner.devauth.gson"
}

jar.dependsOn(shadowJar)

0 comments on commit b944d36

Please sign in to comment.