From 9d3583293bd375548bb4687711b8e9e6e5c12b05 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Sat, 5 Jun 2021 18:06:06 +0200 Subject: [PATCH] Bundle Gson on 1.11.2 and below (fixes #421) Decided to go with 1.11.2 because the Gson from that version is the first to not have the JsonAdapter annotiation, which we want for fixing #520. --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a0a3e43a..93f5c79d 100644 --- a/build.gradle +++ b/build.gradle @@ -228,7 +228,7 @@ def shadeExclusions = { // Cannot just add these to the shade configuration because they'd be inherited by the compile configuration then exclude group: 'com.google.guava', module: 'guava-jdk5' exclude group: 'com.google.guava', module: 'guava' // provided by MC - exclude group: 'com.google.code.gson', module: 'gson' // provided by MC + exclude group: 'com.google.code.gson', module: 'gson' // provided by MC (or manually bundled for 1.11.2 and below) } dependencies { @@ -312,6 +312,11 @@ dependencies { } } + if (mcVersion < 11200) { + // The version which MC ships is too old, we'll need to ship our own + shadow 'com.google.code.gson:gson:2.8.7' + } + shadow 'com.github.javagl.JglTF:jgltf-model:3af6de4' if (FABRIC) {