From 4ec5ef75a17e39bb7d4730b6d4462f7dfde8e69e Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Fri, 21 Jun 2019 15:00:08 +0200 Subject: [PATCH] Fix various replay editor issues caused by shadow plugin bug --- versions/common.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/versions/common.gradle b/versions/common.gradle index 882a13f8..01a8fc0f 100644 --- a/versions/common.gradle +++ b/versions/common.gradle @@ -334,7 +334,13 @@ task configureRelocation() { pkgs << pkg.substring(0, pkg.indexOf('/', 4)) } } else if (!pkg.startsWith('javax/')) { - pkgs << pkg.substring(0, pkg.indexOf('/')) + // Note: we cannot just use top level packages as those will be too generic and we'll run + // into this long standing bug: https://github.com/johnrengelman/shadow/issues/232 + def i = pkg.indexOf('/') + def i2 = pkg.indexOf('/', i + 1) + if (i2 > 0) { + pkgs << pkg.substring(0, i2) + } } } }