1 <!-- Ant build script for ProGuard. --> 2 3 <project name = "proguard" 4 default = "all" 5 basedir = ".."> 6 7 <property file = "build/build.properties"/> 8 <property name = "src" value = "src"/> 9 <property name = "classes" value = "classes"/> 10 <property name = "lib" value = "lib"/> 11 12 <property name = "ant.jar" value = "${ant.home}/lib/ant.jar"/> 13 <property name = "wtk.jar" value = "${wtk.home}/wtklib/kenv.jar"/> 14 15 <target name = "all" depends = "basic,options"/> 16 <target name = "basic" depends = "proguard,proguardgui,retrace"/> 17 <target name = "options" depends = "anttask,wtkplugin"/> 18 19 <target name = "proguard" depends = "classes,lib"> 20 <javac nowarn = "true" 21 deprecation = "false" 22 srcdir = "${src}" 23 destdir = "${classes}" 24 includes = "proguard/ProGuard.java"> 25 <compilerarg value = "-Xlint:none"/> 26 </javac> 27 28 <copy todir = "${classes}"> 29 <fileset dir = "${src}"> 30 <include name = "proguard/*.properties"/> 31 <include name = "proguard/*.png"/> 32 <include name = "proguard/*.gif"/> 33 <include name = "proguard/*.pro"/> 34 </fileset> 35 </copy> 36 37 <jar jarfile = "${lib}/proguard.jar" 38 manifest = "${src}/proguard/MANIFEST.MF" 39 basedir = "${classes}" 40 includes = "proguard/**"/> 41 </target> 42 43 <target name = "proguardgui" depends = "proguard"> 44 <javac nowarn = "true" 45 deprecation = "false" 46 srcdir = "${src}" 47 destdir = "${classes}" 48 includes = "proguard/gui/ProGuardGUI.java"> 49 <compilerarg value = "-Xlint:none"/> 50 </javac> 51 52 <copy todir = "${classes}"> 53 <fileset dir = "${src}"> 54 <include name = "proguard/gui/*.properties"/> 55 <include name = "proguard/gui/*.png"/> 56 <include name = "proguard/gui/*.gif"/> 57 <include name = "proguard/gui/*.pro"/> 58 </fileset> 59 </copy> 60 61 <jar jarfile = "${lib}/proguardgui.jar" 62 manifest = "${src}/proguard/gui/MANIFEST.MF" 63 basedir = "${classes}" 64 includes = "proguard/gui/**"/> 65 </target> 66 67 <target name = "retrace" depends = "classes,lib"> 68 <javac nowarn = "true" 69 deprecation = "false" 70 srcdir = "${src}" 71 destdir = "${classes}" 72 includes = "proguard/retrace/ReTrace.java"> 73 <compilerarg value = "-Xlint:none"/> 74 </javac> 75 76 <copy todir = "${classes}"> 77 <fileset dir = "${src}"> 78 <include name = "proguard/retrace/*.properties"/> 79 <include name = "proguard/retrace/*.png"/> 80 <include name = "proguard/retrace/*.gif"/> 81 <include name = "proguard/retrace/*.pro"/> 82 </fileset> 83 </copy> 84 85 <jar jarfile = "${lib}/retrace.jar" 86 manifest = "${src}/proguard/retrace/MANIFEST.MF" 87 basedir = "${classes}" 88 includes = "proguard/retrace/**"/> 89 </target> 90 91 <target name = "anttask" depends = "proguard"> 92 <fail message="Please set the value of the property ant.home in the file build/build.properties, if you want to build the optional ProGuard Ant task."> 93 <condition> 94 <not> 95 <available file="${ant.jar}"/> 96 </not> 97 </condition> 98 </fail> 99 100 <javac nowarn = "true" 101 deprecation = "false" 102 classpath = "${ant.jar}" 103 srcdir = "${src}" 104 destdir = "${classes}" 105 includes = "proguard/ant/ProGuardTask.java"> 106 <compilerarg value = "-Xlint:none"/> 107 </javac> 108 109 <copy todir = "${classes}"> 110 <fileset dir = "${src}"> 111 <include name = "proguard/ant/*.properties"/> 112 <include name = "proguard/ant/*.png"/> 113 <include name = "proguard/ant/*.gif"/> 114 <include name = "proguard/ant/*.pro"/> 115 </fileset> 116 </copy> 117 118 <jar jarfile = "${lib}/proguard.jar" 119 update = "true" 120 basedir = "${classes}" 121 includes = "proguard/ant/**"/> 122 </target> 123 124 <target name = "wtkplugin" depends = "proguard"> 125 <fail message="Please set the value of the property wtk.home in the file build/build.properties, if you want to build the optional ProGuard WTK plugin."> 126 <condition> 127 <not> 128 <available file="${wtk.jar}"/> 129 </not> 130 </condition> 131 </fail> 132 133 <javac nowarn = "true" 134 deprecation = "false" 135 classpath = "${wtk.jar}" 136 srcdir = "${src}" 137 destdir = "${classes}" 138 includes = "proguard/wtk/ProGuardObfuscator.java"> 139 <compilerarg value = "-Xlint:none"/> 140 </javac> 141 142 <copy todir = "${classes}"> 143 <fileset dir = "${src}"> 144 <include name = "proguard/wtk/*.properties"/> 145 <include name = "proguard/wtk/*.png"/> 146 <include name = "proguard/wtk/*.gif"/> 147 <include name = "proguard/wtk/*.pro"/> 148 </fileset> 149 </copy> 150 151 <jar jarfile = "${lib}/proguard.jar" 152 update = "true" 153 basedir = "${classes}" 154 includes = "proguard/wtk/**"/> 155 </target> 156 157 <target name = "classes"> 158 <mkdir dir = "${classes}"/> 159 </target> 160 161 <target name = "lib"> 162 <mkdir dir = "${lib}"/> 163 </target> 164 165 <target name = "clean"> 166 <delete> 167 <fileset dir = "${classes}"/> 168 <fileset dir = "${lib}"/> 169 </delete> 170 </target> 171 </project> 172