summaryrefslogtreecommitdiff
path: root/src/proguard/Initializer.java
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-02-27 10:21:35 -0800
committerYing Wang <wangying@google.com>2012-02-27 11:54:51 -0800
commitcfead78069f3dc32998dc118ee08cab3867acea2 (patch)
tree9600f15eed62fa9ba63ce5894d1f09fe686d5997 /src/proguard/Initializer.java
parent10aa7224f49abe49d123bde5d34346202d49aaca (diff)
downloadproguard-cfead78069f3dc32998dc118ee08cab3867acea2.tar.gz
Upgrade from Progaurd 4.4 to 4.7.
Change-Id: Ie185d0be411a80cc6a330cafa8547252a7dc1d9c You can find the changelog here http://proguard.sourceforge.net/#downloads.html
Diffstat (limited to 'src/proguard/Initializer.java')
-rw-r--r--src/proguard/Initializer.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/proguard/Initializer.java b/src/proguard/Initializer.java
index 41cf971..dc17b00 100644
--- a/src/proguard/Initializer.java
+++ b/src/proguard/Initializer.java
@@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
- * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
+ * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -60,6 +60,11 @@ public class Initializer
{
int originalLibraryClassPoolSize = libraryClassPool.size();
+ // Perform a basic check on the keep options in the configuration.
+ WarningPrinter keepClassMemberNotePrinter = new WarningPrinter(System.out, configuration.note);
+
+ new KeepClassMemberChecker(keepClassMemberNotePrinter).checkClassSpecifications(configuration.keep);
+
// Construct a reduced library class pool with only those library
// classes whose hierarchies are referenced by the program classes.
// We can't do this if we later have to come up with the obfuscated
@@ -275,8 +280,12 @@ public class Initializer
{
System.err.println("Warning: there were " + classReferenceWarningCount +
" unresolved references to classes or interfaces.");
- System.err.println(" You may need to specify additional library jars (using '-libraryjars'),");
- System.err.println(" or perhaps the '-dontskipnonpubliclibraryclasses' option.");
+ System.err.println(" You may need to specify additional library jars (using '-libraryjars').");
+
+ if (configuration.skipNonPublicLibraryClasses)
+ {
+ System.err.println(" You may also have to remove the option '-skipnonpubliclibraryclasses'.");
+ }
}
int dependencyWarningCount = dependencyWarningPrinter.getWarningCount();
@@ -295,9 +304,13 @@ public class Initializer
" unresolved references to program class members.");
System.err.println(" Your input classes appear to be inconsistent.");
System.err.println(" You may need to recompile them and try again.");
- System.err.println(" Alternatively, you may have to specify the options ");
- System.err.println(" '-dontskipnonpubliclibraryclasses' and/or");
+ System.err.println(" Alternatively, you may have to specify the option ");
System.err.println(" '-dontskipnonpubliclibraryclassmembers'.");
+
+ if (configuration.skipNonPublicLibraryClasses)
+ {
+ System.err.println(" You may also have to remove the option '-skipnonpubliclibraryclasses'.");
+ }
}
if ((classReferenceWarningCount > 0 ||