diff options
Diffstat (limited to 'src/proguard/ant/ConfigurationTask.java')
-rw-r--r-- | src/proguard/ant/ConfigurationTask.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/proguard/ant/ConfigurationTask.java b/src/proguard/ant/ConfigurationTask.java index 0d2f04f..376a1a1 100644 --- a/src/proguard/ant/ConfigurationTask.java +++ b/src/proguard/ant/ConfigurationTask.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-2013 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 @@ -291,10 +291,20 @@ public class ConfigurationTask extends Task { try { - String arg = getProject().replaceProperties(text); + Project project = getProject(); - ConfigurationParser parser = new ConfigurationParser(new String[] { arg }, - getProject().getBaseDir()); + // Replace Ant-style properties ('${...}'). + String arg = project.replaceProperties(text); + + // Get the combined system properties and Ant properties, for + // replacing ProGuard-style properties ('<...>'). + Properties properties = new Properties(); + properties.putAll(project.getProperties()); + + ConfigurationParser parser = new ConfigurationParser(arg, + "embedded configuration", + project.getBaseDir(), + properties); try { |