summaryrefslogtreecommitdiff
path: root/src/proguard/ConfigurationChecker.java
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-11-10 14:20:59 +0000
committerPaul Duffin <paulduffin@google.com>2018-01-08 19:51:15 +0000
commit45e52b5ab37a26149ce031caa44bb167da217667 (patch)
tree61a3b7248024bbf31d1f180e9c2477696f042517 /src/proguard/ConfigurationChecker.java
parente8bc3b2a283ea35317a8096dcf2c3d9959af40b2 (diff)
downloadproguard-45e52b5ab37a26149ce031caa44bb167da217667.tar.gz
Try and address the problem of using Proguard with applications that duplicate some classes in android.jar, e.g. applications that statically include junit. See https://sourceforge.net/p/proguard/discussion/182455/thread/76430d9e/ for more information. Rebuilt proguard with ant 1.10.1 and gradle 2.1 Bug: 30188076 Bug: 69156675 Test: make checkbuild Change-Id: I574becf07ed4a247e966f2c023e4b95b5ffc4011
Diffstat (limited to 'src/proguard/ConfigurationChecker.java')
-rw-r--r--src/proguard/ConfigurationChecker.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/proguard/ConfigurationChecker.java b/src/proguard/ConfigurationChecker.java
index 84d4663..05087f5 100644
--- a/src/proguard/ConfigurationChecker.java
+++ b/src/proguard/ConfigurationChecker.java
@@ -50,6 +50,8 @@ public class ConfigurationChecker
{
ClassPath programJars = configuration.programJars;
ClassPath libraryJars = configuration.libraryJars;
+ // Android-added: Get the systemJars list to check.
+ ClassPath systemJars = configuration.systemJars;
// Check that the input isn't empty.
if (programJars == null)
@@ -79,9 +81,18 @@ public class ConfigurationChecker
}
// Check for conflicts between input/output entries of the class paths.
+ ClassPath systemAndLibraryJars = new ClassPath();
+ // Android-added: Merge the system and library jars into one list.
+ if (libraryJars != null) {
+ systemAndLibraryJars.addAll(libraryJars);
+ }
+ if (systemJars != null) {
+ systemAndLibraryJars.addAll(systemJars);
+ }
checkConflicts(programJars, programJars);
- checkConflicts(programJars, libraryJars);
- checkConflicts(libraryJars, libraryJars);
+ // Android-changed: Check for conflicts with the system/library jars.
+ checkConflicts(programJars, systemAndLibraryJars);
+ checkConflicts(systemAndLibraryJars, systemAndLibraryJars);
// Print out some general notes if necessary.
if ((configuration.note == null ||