Skip to content

Commit 7d2f92b

Browse files
committed
Remove obsolete shrinker properties
1 parent 3701c58 commit 7d2f92b

5 files changed

Lines changed: 1 addition & 90 deletions

File tree

src/main/java/com/yworks/common/ant/Exclude.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yworks.common.ant;
22

33
/**
4-
* Stores which byte code attributes to keep when renaming or shrinking.
4+
* Stores which byte code attributes to keep when renaming.
55
* @author Michael Schroeder, yWorks GmbH http://www.yworks.com
66
*/
77
public abstract class Exclude {

src/main/java/com/yworks/logging/ConsoleLogger.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ public void doWarn( final String s ) {
2929
public void doWarnToLog( String s ) {
3030
}
3131

32-
public void doShrinkLog( String s ) {
33-
System.out.println( s );
34-
}
35-
3632
public void doErr( String s, Throwable ex ) {
3733
System.out.println( s );
3834
ex.printStackTrace();

src/main/java/com/yworks/logging/Logger.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,6 @@
99
* @author Michael Schroeder, yWorks GmbH http://www.yworks.com
1010
*/
1111
public abstract class Logger {
12-
13-
14-
/**
15-
* The enum Shrink type.
16-
*/
17-
public enum ShrinkType {
18-
/**
19-
* Class shrink type.
20-
*/
21-
CLASS,
22-
/**
23-
* Method shrink type.
24-
*/
25-
METHOD,
26-
/**
27-
* Field shrink type.
28-
*/
29-
FIELD }
30-
31-
3212
private static List<Logger> instances;
3313

3414
/**
@@ -117,19 +97,6 @@ public static void warnToLog( final String s ) {
11797
}
11898
}
11999

120-
/**
121-
* Shrink log.
122-
*
123-
* @param s the s
124-
*/
125-
public static void shrinkLog( final String s ) {
126-
if ( null != instances ) {
127-
for ( Logger logger : instances ) {
128-
logger.doShrinkLog( s );
129-
}
130-
}
131-
}
132-
133100
/**
134101
* Do log.
135102
*
@@ -158,13 +125,6 @@ public static void shrinkLog( final String s ) {
158125
*/
159126
public abstract void doWarnToLog( String s );
160127

161-
/**
162-
* Do shrink log.
163-
*
164-
* @param s the s
165-
*/
166-
public abstract void doShrinkLog( String s );
167-
168128
/**
169129
* Do err.
170130
*

src/main/java/com/yworks/logging/XmlLogger.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ public void doWarnToLog( String s ) {
5252
pw.println( "<!-- WARNING:" + s + " -->" );
5353
}
5454

55-
public void doShrinkLog( String s ) {
56-
pw.println( s );
57-
}
58-
5955
public void close() {
60-
pw.println("</yshrink>");
6156
pw.println();
6257
pw.close();
6358
unregister();

src/main/java/com/yworks/yguard/ObfuscatorTask.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.yworks.yguard.ant.Mappable;
1010
import com.yworks.yguard.ant.MethodSection;
1111
import com.yworks.yguard.ant.PackageSection;
12-
import com.yworks.common.ShrinkBag;
1312
import com.yworks.common.ant.AttributesSection;
1413
import com.yworks.common.ant.Exclude;
1514
import 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

Comments
 (0)