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 = "gradle.jar1" value = "${gradle.home}/lib/plugins/gradle-plugins-1.3.jar"/> 13 <property name = "gradle.jar2" value = "${gradle.home}/lib/gradle-base-services-1.3.jar"/> 14 <property name = "gradle.jar3" value = "${gradle.home}/lib/gradle-core-1.3.jar"/> 15 <property name = "gradle.jar4" value = "${gradle.home}/lib/groovy-all-1.8.6.jar"/> 16 <property name = "wtk.jar" value = "${wtk.home}/wtklib/kenv.zip"/> 17 18 <target name = "all" depends = "basic,options"/> 19 <target name = "basic" depends = "proguard,proguardgui,retrace"/> 20 <target name = "options" depends = "anttask,wtkplugin"/> 21 22 <target name = "proguard" depends = "classes,lib"> 23 <javac nowarn = "true" 24 deprecation = "false" 25 includeantruntime = "false" 26 srcdir = "${src}" 27 destdir = "${classes}" 28 includes = "proguard/ProGuard.java"> 29 <compilerarg value = "-Xlint:none"/> 30 </javac> 31 32 <copy todir = "${classes}"> 33 <fileset dir = "${src}"> 34 <include name = "proguard/*.properties"/> 35 <include name = "proguard/*.png"/> 36 <include name = "proguard/*.gif"/> 37 <include name = "proguard/*.pro"/> 38 </fileset> 39 </copy> 40 41 <jar jarfile = "${lib}/proguard.jar" 42 manifest = "${src}/proguard/MANIFEST.MF" 43 basedir = "${classes}" 44 includes = "proguard/**"/> 45 </target> 46 47 <target name = "proguardgui" depends = "proguard"> 48 <javac nowarn = "true" 49 deprecation = "false" 50 includeantruntime = "false" 51 srcdir = "${src}" 52 destdir = "${classes}" 53 includes = "proguard/gui/ProGuardGUI.java"> 54 <compilerarg value = "-Xlint:none"/> 55 </javac> 56 57 <copy todir = "${classes}"> 58 <fileset dir = "${src}"> 59 <include name = "proguard/gui/*.properties"/> 60 <include name = "proguard/gui/*.png"/> 61 <include name = "proguard/gui/*.gif"/> 62 <include name = "proguard/gui/*.pro"/> 63 </fileset> 64 </copy> 65 66 <jar jarfile = "${lib}/proguardgui.jar" 67 manifest = "${src}/proguard/gui/MANIFEST.MF" 68 basedir = "${classes}" 69 includes = "proguard/gui/**"/> 70 </target> 71 72 <target name = "retrace" depends = "classes,lib"> 73 <javac nowarn = "true" 74 deprecation = "false" 75 includeantruntime = "false" 76 srcdir = "${src}" 77 destdir = "${classes}" 78 includes = "proguard/retrace/ReTrace.java"> 79 <compilerarg value = "-Xlint:none"/> 80 </javac> 81 82 <copy todir = "${classes}"> 83 <fileset dir = "${src}"> 84 <include name = "proguard/retrace/*.properties"/> 85 <include name = "proguard/retrace/*.png"/> 86 <include name = "proguard/retrace/*.gif"/> 87 <include name = "proguard/retrace/*.pro"/> 88 </fileset> 89 </copy> 90 91 <jar jarfile = "${lib}/retrace.jar" 92 manifest = "${src}/proguard/retrace/MANIFEST.MF" 93 basedir = "${classes}" 94 includes = "proguard/retrace/**"/> 95 </target> 96 97 <target name = "anttask" depends = "proguard"> 98 <javac nowarn = "true" 99 deprecation = "false" 100 includeantruntime = "true" 101 srcdir = "${src}" 102 destdir = "${classes}" 103 includes = "proguard/ant/ProGuardTask.java"> 104 <compilerarg value = "-Xlint:none"/> 105 </javac> 106 107 <copy todir = "${classes}"> 108 <fileset dir = "${src}"> 109 <include name = "proguard/ant/*.properties"/> 110 <include name = "proguard/ant/*.png"/> 111 <include name = "proguard/ant/*.gif"/> 112 <include name = "proguard/ant/*.pro"/> 113 </fileset> 114 </copy> 115 116 <jar jarfile = "${lib}/proguard.jar" 117 update = "true" 118 basedir = "${classes}" 119 includes = "proguard/ant/**"/> 120 </target> 121 122 <target name = "gradletask" depends = "proguard"> 123 <fail message="Please set the value of the property gradle.home in the file build.properties, if you want to build the optional ProGuard Gradle task."> 124 <condition> 125 <not> 126 <and> 127 <available file="${gradle.jar1}"/> 128 <available file="${gradle.jar2}"/> 129 <available file="${gradle.jar3}"/> 130 <available file="${gradle.jar4}"/> 131 </and> 132 </not> 133 </condition> 134 </fail> 135 136 <javac nowarn = "true" 137 deprecation = "false" 138 includeantruntime = "false" 139 srcdir = "${src}" 140 destdir = "${classes}" 141 includes = "proguard/gradle/ProGuardTask.java"> 142 <compilerarg value = "-Xlint:none"/> 143 <classpath> 144 <path location="${gradle.jar1}"/> 145 <path location="${gradle.jar2}"/> 146 <path location="${gradle.jar3}"/> 147 <path location="${gradle.jar4}"/> 148 </classpath> 149 </javac> 150 151 <copy todir = "${classes}"> 152 <fileset dir = "${src}"> 153 <include name = "proguard/gradle/*.properties"/> 154 <include name = "proguard/gradle/*.png"/> 155 <include name = "proguard/gradle/*.gif"/> 156 <include name = "proguard/gradle/*.pro"/> 157 </fileset> 158 </copy> 159 160 <jar jarfile = "${lib}/proguard.jar" 161 update = "true" 162 basedir = "${classes}" 163 includes = "proguard/gradle/**"/> 164 </target> 165 166 <target name = "wtkplugin" depends = "proguard"> 167 <fail message="Please set the value of the property wtk.home in the file build.properties, if you want to build the optional ProGuard WTK plugin."> 168 <condition> 169 <not> 170 <available file="${wtk.jar}"/> 171 </not> 172 </condition> 173 </fail> 174 175 <javac nowarn = "true" 176 deprecation = "false" 177 includeantruntime = "false" 178 classpath = "${wtk.jar}" 179 srcdir = "${src}" 180 destdir = "${classes}" 181 includes = "proguard/wtk/ProGuardObfuscator.java"> 182 <compilerarg value = "-Xlint:none"/> 183 </javac> 184 185 <copy todir = "${classes}"> 186 <fileset dir = "${src}"> 187 <include name = "proguard/wtk/*.properties"/> 188 <include name = "proguard/wtk/*.png"/> 189 <include name = "proguard/wtk/*.gif"/> 190 <include name = "proguard/wtk/*.pro"/> 191 </fileset> 192 </copy> 193 194 <jar jarfile = "${lib}/proguard.jar" 195 update = "true" 196 basedir = "${classes}" 197 includes = "proguard/wtk/**"/> 198 </target> 199 200 <target name = "classes"> 201 <mkdir dir = "${classes}"/> 202 </target> 203 204 <target name = "lib"> 205 <mkdir dir = "${lib}"/> 206 </target> 207 208 <target name = "clean"> 209 <delete> 210 <fileset dir = "${classes}"/> 211 <fileset dir = "${lib}"/> 212 </delete> 213 </target> 214 </project> 215