Hello im trying to make a mod and the past few days GSON has almost killed me, when i export the mod and then launch it through minecraft launcher i get
java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;
i have literally tried everything here is my build config
dependencies {
minecraft("com.mojang:minecraft:1.8.9")
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9")
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9")
compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+")
shadowImpl("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") {
isTransitive = false
exclude(module = "gson")
}
shadowImpl("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
isTransitive = false
exclude(module = "gson")
}
annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT")
shadowImpl("org.javassist:javassist:3.15.0-GA") {
isTransitive = false
exclude(module = "gson")
}
shadowImpl("com.neovisionaries:nv-i18n:1.28") {
isTransitive = false
exclude(module = "gson")
}
shadowImpl("org.apache.commons:commons-lang3:3.4") {
isTransitive = false
exclude(module = "gson")
}
shadowImpl("org.apache.httpcomponents:httpcore:4.4.5") {
isTransitive = false
exclude(module = "gson")
}
compileOnly("com.google.code.gson:gson:2.8.6") { isTransitive = false }
configurations.all { resolutionStrategy { force("com.google.code.gson:gson:2.8.6") } }
shadowImpl(fileTree(
mapOf(
"dir" to "libs",
"include" to listOf("*.jar"),
"exclude" to listOf(
"asm",
"asm-commons",
"asm-tree",
"gson",
"unspecified",
"nv-i18n"
)
)
))
}