From 1ef4f605d7f0741d1cf706344248d28302c0b048 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Mon, 20 May 2019 15:08:48 +0200 Subject: [PATCH] Fix accidental relocating of guava, commons-io and apache-logging (all provided by MC) --- versions/common.gradle | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/versions/common.gradle b/versions/common.gradle index b5b3289b..5ba72500 100644 --- a/versions/common.gradle +++ b/versions/common.gradle @@ -306,13 +306,25 @@ task configureRelocation() { def pkgs = [].toSet() tree.visit { file -> if (!file.directory && file.name.endsWith('.class') && file.path.contains('/')) { - def pkg = file.path.substring(0, file.path.lastIndexOf('/')) + def pkg = file.path.substring(0, file.path.lastIndexOf('/')) + '/' if (pkg.startsWith('com/')) { - if (!pkg.startsWith('com/replaymod')) { + if (pkg.startsWith('com/google/')) { + if (!pkg.startsWith('com/google/common')) { + pkgs << pkg.substring(0, pkg.indexOf('/', 'com/google/'.length())) + } + } else if (!pkg.startsWith('com/replaymod')) { pkgs << pkg.substring(0, pkg.indexOf('/', 4)) } } else if (pkg.startsWith('org/')) { - if (!pkg.startsWith('org/spongepowered')) { + if (pkg.startsWith('org/apache/')) { + if (pkg.startsWith('org/apache/commons/')) { + if (!pkg.startsWith('org/apache/commons/io')) { + pkgs << pkg.substring(0, pkg.indexOf('/', 'org/apache/commons/'.length())) + } + } else if (!pkg.startsWith('org/apache/logging')) { + pkgs << pkg.substring(0, pkg.indexOf('/', 'org/apache/'.length())) + } + } else if (!pkg.startsWith('org/spongepowered')) { pkgs << pkg.substring(0, pkg.indexOf('/', 4)) } } else if (!pkg.startsWith('javax/')) {