diff options
Diffstat (limited to 'src/proguard/ant/ProGuardTask.java')
-rw-r--r-- | src/proguard/ant/ProGuardTask.java | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/proguard/ant/ProGuardTask.java b/src/proguard/ant/ProGuardTask.java index b7fc361..982c2dd 100644 --- a/src/proguard/ant/ProGuardTask.java +++ b/src/proguard/ant/ProGuardTask.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 @@ -215,6 +215,12 @@ public class ProGuardTask extends ConfigurationTask } + public void setKeepparameternames(boolean keepParameterNames) + { + configuration.keepParameterNames = keepParameterNames; + } + + public void setRenamesourcefileattribute(String newSourceFileAttribute) { configuration.newSourceFileAttribute = newSourceFileAttribute; @@ -241,13 +247,39 @@ public class ProGuardTask extends ConfigurationTask public void setNote(boolean note) { - configuration.note = note ? null : new ArrayList(); + if (note) + { + // Switch on notes if they were completely disabled. + if (configuration.note != null && + configuration.note.isEmpty()) + { + configuration.note = null; + } + } + else + { + // Switch off notes. + configuration.note = new ArrayList(); + } } public void setWarn(boolean warn) { - configuration.warn = warn ? null : new ArrayList(); + if (warn) + { + // Switch on warnings if they were completely disabled. + if (configuration.warn != null && + configuration.warn.isEmpty()) + { + configuration.warn = null; + } + } + else + { + // Switch off warnings. + configuration.warn = new ArrayList(); + } } |