99import com .yworks .yguard .ant .Mappable ;
1010import com .yworks .yguard .ant .MethodSection ;
1111import com .yworks .yguard .ant .PackageSection ;
12- import com .yworks .common .ShrinkBag ;
1312import com .yworks .common .ant .AttributesSection ;
1413import com .yworks .common .ant .Exclude ;
1514import com .yworks .common .ant .InOutPair ;
@@ -101,9 +100,6 @@ public class ObfuscatorTask extends YGuardBaseTask
101100 protected PatchSection patch = null ;
102101 //private Path resourceClassPath;
103102
104- // shrinking attributes
105- private boolean doShrink = false ;
106- private File shrinkLog = null ;
107103 private boolean useExposeAsEntryPoints = true ;
108104
109105 private static final String LOG_TITLE_PRE_VERSION = " yGuard Bytecode Obfuscator, v" ;
@@ -112,7 +108,6 @@ public class ObfuscatorTask extends YGuardBaseTask
112108 private static final String LOG_INPUT_FILE = " Jar file to be obfuscated: " ;
113109 private static final String LOG_OUTPUT_FILE = " Target Jar file for obfuscated code: " ;
114110
115- private static final String NO_SHRINKING_SUPPORT = "No shrinking support found." ;
116111 private static final String DEPRECATED = "The obfuscate task is deprecated. Please use the new com.yworks.yguard.YGuardTask instead." ;
117112
118113
@@ -992,10 +987,6 @@ public void execute() throws BuildException
992987
993988 TaskLogger taskLogger = new TaskLogger ();
994989
995- if ( ! ( mode == MODE_STANDALONE ) ) {
996- doShrink = false ;
997- }
998-
999990 ResourceCpResolver resolver = null ;
1000991 if (resourceClassPath != null ){
1001992 resolver = new ResourceCpResolver (resourceClassPath , this );
@@ -1172,14 +1163,6 @@ public void execute() throws BuildException
11721163 db .close ();
11731164 Cl .setClassResolver (null );
11741165
1175- if ( doShrink ) {
1176- for ( int i = 0 ; i < tempJars .length ; i ++ ) {
1177- if ( null != tempJars [ i ] ) {
1178- tempJars [ i ].delete ();
1179- }
1180- }
1181- }
1182-
11831166 if ( !Logger .getInstance ().isAllResolved () ) {
11841167 Logger .getInstance ().warning ( "Not all dependencies could be resolved. Please see the logfile for details." );
11851168 }
@@ -1239,29 +1222,6 @@ protected ResourceAdjuster newResourceAdjuster(GuardDB db) {
12391222 return new ResourceAdjuster (db );
12401223 }
12411224
1242- /**
1243- * Sets shrink.
1244- *
1245- * @param doShrink the do shrink
1246- */
1247- public void setShrink ( boolean doShrink ) {
1248- if ( mode == MODE_STANDALONE ) {
1249- this .doShrink = doShrink ;
1250- } else {
1251- throw new BuildException (
1252- "The shrink attribute is not supported when the obfuscate task is nested inside a yguard task.\n Use a separate nested shrink task instead." );
1253- }
1254- }
1255-
1256- /**
1257- * Sets shrink log.
1258- *
1259- * @param shrinkLog the shrink log
1260- */
1261- public void setShrinkLog ( File shrinkLog ) {
1262- this .shrinkLog = shrinkLog ;
1263- }
1264-
12651225 /**
12661226 * Sets use expose as entry points.
12671227 *
0 commit comments