|
@@ -88,4 +88,117 @@
|
88
|
88
|
</findbugs>
|
89
|
89
|
<xslt in="reports/findbugs/report-fb.xml" style="checkstyle/findbugs.xslt" out="reports/report-fb.html" />
|
90
|
90
|
</target>
|
|
91
|
+
|
|
92
|
+ <target name="-init-proguard" depends="-init-dependencies">
|
|
93
|
+ <taskdef resource="proguard/ant/task.properties" classpathref="analyse-classpath"/>
|
|
94
|
+ </target>
|
|
95
|
+
|
|
96
|
+ <target name="deadcode" depends="-init-proguard">
|
|
97
|
+ <proguard>
|
|
98
|
+ -libraryjars ${java.home}/lib/rt.jar
|
|
99
|
+ -libraryjars ${java.home}/lib/jce.jar
|
|
100
|
+ -libraryjars lib/main/
|
|
101
|
+ -libraryjars modules/plugins/lib/main/
|
|
102
|
+
|
|
103
|
+ -injars dist/DMDirc.jar(com/dmdirc/**,net/miginfocom/**)
|
|
104
|
+ -injars modules/plugins/dist/(com/dmdirc/**)
|
|
105
|
+
|
|
106
|
+ -dontoptimize
|
|
107
|
+ -dontobfuscate
|
|
108
|
+ -dontpreverify
|
|
109
|
+ -printusage reports/deadcode.txt
|
|
110
|
+
|
|
111
|
+ -dontnote !com.dmdirc.**
|
|
112
|
+
|
|
113
|
+ <!-- The main entry point -->
|
|
114
|
+ -keep public class com.dmdirc.Main {
|
|
115
|
+ public static void main(java.lang.String[]);
|
|
116
|
+ }
|
|
117
|
+
|
|
118
|
+ <!-- All plugins -->
|
|
119
|
+ -keep class ** implements com.dmdirc.plugins.Plugin {
|
|
120
|
+ <init>(...);
|
|
121
|
+ public void load(com.dmdirc.plugins.PluginInfo, dagger.ObjectGraph);
|
|
122
|
+ public void onLoad();
|
|
123
|
+ public void showConfig(com.dmdirc.config.prefs.PreferencesDialogModel);
|
|
124
|
+ }
|
|
125
|
+
|
|
126
|
+ <!-- Dagger provider methods -->
|
|
127
|
+ -keepclassmembers @dagger.Module class ** {
|
|
128
|
+ @dagger.Provides *;
|
|
129
|
+ }
|
|
130
|
+
|
|
131
|
+ <!-- Dagger generated subclasses -->
|
|
132
|
+ -keep class **$$ModuleAdapter
|
|
133
|
+ -keep class **$$InjectAdapter
|
|
134
|
+ -keep class **$$StaticInjection
|
|
135
|
+
|
|
136
|
+ <!-- Injectable constructors -->
|
|
137
|
+ -keepclassmembers class * {
|
|
138
|
+ @javax.inject.Inject *;
|
|
139
|
+ <init>();
|
|
140
|
+ }
|
|
141
|
+
|
|
142
|
+ <!-- Package info classes -->
|
|
143
|
+ -keep class **.package-info
|
|
144
|
+
|
|
145
|
+ <!-- Enum stuff. -->
|
|
146
|
+ -keepclassmembers enum ** {
|
|
147
|
+ *** valueOf(java.lang.String);
|
|
148
|
+ *** values();
|
|
149
|
+ }
|
|
150
|
+
|
|
151
|
+ <!-- Parser callbacks -->
|
|
152
|
+ -keepclassmembers class ** {
|
|
153
|
+ public void on*(com.dmdirc.parser.interfaces.Parser, ...);
|
|
154
|
+ }
|
|
155
|
+
|
|
156
|
+ <!-- Serializable version fields -->
|
|
157
|
+ -keepclassmembers class ** implements java.io.Serializable {
|
|
158
|
+ static final long serialVersionUID;
|
|
159
|
+ }
|
|
160
|
+
|
|
161
|
+ <!-- Swing dialogs -->
|
|
162
|
+ -keep class com.dmdirc.addons.ui_swing.** extends com.dmdirc.addons.ui_swing.dialogs.StandardDialog {
|
|
163
|
+ <init>(...);
|
|
164
|
+ }
|
|
165
|
+
|
|
166
|
+ <!-- Swing window implementations -->
|
|
167
|
+ -keep class ** extends com.dmdirc.addons.ui_swing.components.frames.TextFrame {
|
|
168
|
+ <init>(...);
|
|
169
|
+ }
|
|
170
|
+
|
|
171
|
+ <!-- Swing frame managers -->
|
|
172
|
+ -keep class ** implements com.dmdirc.addons.ui_swing.framemanager.FrameManager {
|
|
173
|
+ <init>(...);
|
|
174
|
+ }
|
|
175
|
+
|
|
176
|
+ <!-- DCC plugin panels -->
|
|
177
|
+ -keep class com.dmdirc.addons.dcc.ui.PlaceholderPanel { <init>(...); }
|
|
178
|
+ -keep class com.dmdirc.addons.dcc.ui.TransferPanel { <init>(...); }
|
|
179
|
+
|
|
180
|
+ <!-- Exported services -->
|
|
181
|
+ -keepclassmembers class ** implements com.dmdirc.plugins.Plugin {
|
|
182
|
+ <!-- Parsers -->
|
|
183
|
+ public com.dmdirc.parser.interfaces.Parser getParser(com.dmdirc.parser.common.MyInfo,java.net.URI);
|
|
184
|
+ public com.dmdirc.parser.interfaces.ProtocolDescription getDescription();
|
|
185
|
+ <!-- Tab completers -->
|
|
186
|
+ public com.dmdirc.ui.input.tabstyles.TabCompletionStyle getCompletionStyle(com.dmdirc.ui.input.TabCompleter,com.dmdirc.WritableFrameContainer);
|
|
187
|
+ }
|
|
188
|
+
|
|
189
|
+ <!-- Possibly inlined constants -->
|
|
190
|
+ -keepclassmembers class * {
|
|
191
|
+ static final % *;
|
|
192
|
+ static final java.lang.String *;
|
|
193
|
+ }
|
|
194
|
+
|
|
195
|
+ <!-- Non-DMDirc classes -->
|
|
196
|
+ -keep class org.** { *; }
|
|
197
|
+ -keep class net.** { *; }
|
|
198
|
+ -keep class com.sun.** { *; }
|
|
199
|
+ -keep class com.google.** { *; }
|
|
200
|
+ -keep class com.palintir.** { *; }
|
|
201
|
+ -keep class dagger.** { *; }
|
|
202
|
+ </proguard>
|
|
203
|
+ </target>
|
91
|
204
|
</project>
|