Skip to content

Commit e5ebef1

Browse files
committed
Cleanup ShrinkTask
1 parent d90d3c1 commit e5ebef1

2 files changed

Lines changed: 0 additions & 390 deletions

File tree

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

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@
44
import com.yworks.common.ShrinkBag;
55
import com.yworks.common.ant.*;
66
import com.yworks.common.ant.AttributesSection;
7-
import com.yworks.yshrink.ant.ShrinkTask;
87
import com.yworks.logging.Logger;
98
import org.apache.tools.ant.BuildException;
109
import org.apache.tools.ant.Task;
1110

1211
import java.io.File;
1312
import java.io.IOException;
1413
import java.util.ArrayList;
15-
import java.util.Collections;
16-
import java.util.Comparator;
1714
import java.util.List;
1815

1916
/**
@@ -64,23 +61,6 @@ public void execute() throws BuildException {
6461
// }
6562
// }
6663

67-
// execute ShrinkTask first
68-
69-
70-
71-
Collections.sort(
72-
subTasks,
73-
new Comparator<YGuardBaseTask>() {
74-
public int compare( YGuardBaseTask o1, YGuardBaseTask o2 ) {
75-
if ( o1 instanceof ShrinkTask ) {
76-
return 0;
77-
}
78-
return 1;
79-
}
80-
}
81-
);
82-
83-
8464
// execute
8565
int taskNum = 0;
8666
File[] outFiles = new File[ pairs.size() ];
@@ -148,28 +128,6 @@ private File getTempFile( File origFile ) {
148128
}
149129
}
150130

151-
/**
152-
* Create shrink shrink task.
153-
*
154-
* @return the shrink task
155-
*/
156-
public ShrinkTask createShrink() {
157-
ShrinkTask shrinkTask = newShrinkTask( YGuardBaseTask.MODE_NESTED );
158-
configureSubTask(shrinkTask);
159-
subTasks.add( shrinkTask );
160-
return shrinkTask;
161-
}
162-
163-
/**
164-
* Instantiates a shrink task,
165-
* subclasses may provide custom implementations.
166-
*
167-
* @return the new shrink task
168-
*/
169-
protected ShrinkTask newShrinkTask( boolean mode ) {
170-
return new ShrinkTask( mode );
171-
}
172-
173131
/**
174132
* Create rename obfuscator task.
175133
*

0 commit comments

Comments
 (0)