-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
81 lines (69 loc) · 2.62 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="UTF-8"?>
<project name="Plupload Java Runtime" default="build" basedir=".">
<property description="Temp directory" name="tmp_dir" value="tmp" />
<path id="java.classpath">
<fileset dir="src/java/libs">
<include name="*.jar"/>
</fileset>
</path>
<path id="tasks.classpath">
<pathelement location="."/>
<fileset dir="src/java/libs">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef resource="proguard/ant/task.properties" classpath="tools/proguard.jar" />
<target name="compile" description="Compiles the plupload Java runtime.">
<mkdir dir="bin" />
<javac srcdir="src/java/src" destdir="bin" target="1.5">
<classpath refid="java.classpath"/>
</javac>
</target>
<target name="clean" description="Cleans the Java Runtime.">
<delete file="plupload.java.jar" />
<delete dir="bin"/>
</target>
<target name="unjar" description="Unjar the libs" >
<unjar dest="bin">
<fileset dir="src/java/libs">
<include name="httpclient-4.0.3.jar" />
<include name="httpcore-4.1.jar" />
</fileset>
</unjar>
<delete dir="bin/META-INF"/>
</target>
<target name="jar" depends="unjar" description="Jars the plupload Java runtime, the jar and its jar dependencies goes to the bin dir.">
<jar destfile="plupload.java.jar" basedir="bin">
<manifest>
<attribute name="Created-By" value="Cabo Communications A/S" />
</manifest>
</jar>
</target>
<target name="sign-jar" description="Signs the Java applet jar. Before this run: keytool -genkey -alias plupload">
<signjar jar="plupload.java.jar" alias="plupload" storepass="123456" />
</target>
<target name="build" depends="clean, compile, jar, proguard, sign-jar">
</target>
<target name="proguard">
<proguard optimizationpasses="2">
-dontwarn org.apache.**
-injars plupload.java.jar
-outjars plupload.java.min.jar
-libraryjars ${java.home}/lib/rt.jar
-libraryjars ${java.home}/lib/plugin.jar
-keep public class plupload.Plupload
-keep public class java.net.IDN
-keepclassmembers class java.net.IDN{
java.lang.String toUnicode(java.lang.String);
}
-keepclassmembers class plupload.Plupload {
void setFileFilter(java.lang.String,java.lang.String[]);
void uploadFile(java.lang.String, java.lang.String, java.lang.String, int, int);
void removeFile(java.lang.String);
void clearFiles();
void openFileDialog();
}
</proguard>
<move file="plupload.java.min.jar" tofile="plupload.java.jar" />
</target>
</project>