summaryrefslogtreecommitdiffstats
path: root/build/build.xml
blob: a5929457cce24b77ba8193b81e93295dc8596314 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!-- Ant build script for ProGuard. -->

<project name    = "proguard"
         default = "all"
         basedir = "..">

  <property file = "build/build.properties"/>
  <property name = "src"     value = "src"/>
  <property name = "classes" value = "classes"/>
  <property name = "lib"     value = "lib"/>

  <property name = "ant.jar" value = "${ant.home}/lib/ant.jar"/>
  <property name = "wtk.jar" value = "${wtk.home}/wtklib/kenv.jar"/>

  <target name = "all"     depends = "basic,options"/>
  <target name = "basic"   depends = "proguard,proguardgui,retrace"/>
  <target name = "options" depends = "anttask,wtkplugin"/>

  <target name = "proguard" depends = "classes,lib">
    <javac nowarn      = "true"
           deprecation = "false"
           srcdir      = "${src}"
           destdir     = "${classes}"
           includes    = "proguard/ProGuard.java">
      <compilerarg value = "-Xlint:none"/>
    </javac>

    <copy todir = "${classes}">
      <fileset dir = "${src}">
        <include name = "proguard/*.properties"/>
        <include name = "proguard/*.png"/>
        <include name = "proguard/*.gif"/>
        <include name = "proguard/*.pro"/>
      </fileset>
    </copy>

    <jar jarfile  = "${lib}/proguard.jar"
         manifest = "${src}/proguard/MANIFEST.MF"
         basedir  = "${classes}"
         includes = "proguard/**"/>
  </target>

  <target name = "proguardgui" depends = "proguard">
    <javac nowarn      = "true"
           deprecation = "false"
           srcdir      = "${src}"
           destdir     = "${classes}"
           includes    = "proguard/gui/ProGuardGUI.java">
      <compilerarg value = "-Xlint:none"/>
    </javac>

    <copy todir = "${classes}">
      <fileset dir = "${src}">
        <include name = "proguard/gui/*.properties"/>
        <include name = "proguard/gui/*.png"/>
        <include name = "proguard/gui/*.gif"/>
        <include name = "proguard/gui/*.pro"/>
      </fileset>
    </copy>

    <jar jarfile  = "${lib}/proguardgui.jar"
         manifest = "${src}/proguard/gui/MANIFEST.MF"
         basedir  = "${classes}"
         includes = "proguard/gui/**"/>
  </target>

  <target name = "retrace" depends = "classes,lib">
    <javac nowarn      = "true"
           deprecation = "false"
           srcdir      = "${src}"
           destdir     = "${classes}"
           includes    = "proguard/retrace/ReTrace.java">
      <compilerarg value = "-Xlint:none"/>
    </javac>

    <copy todir = "${classes}">
      <fileset dir = "${src}">
        <include name = "proguard/retrace/*.properties"/>
        <include name = "proguard/retrace/*.png"/>
        <include name = "proguard/retrace/*.gif"/>
        <include name = "proguard/retrace/*.pro"/>
      </fileset>
    </copy>

    <jar jarfile  = "${lib}/retrace.jar"
         manifest = "${src}/proguard/retrace/MANIFEST.MF"
         basedir  = "${classes}"
         includes = "proguard/retrace/**"/>
  </target>

  <target name = "anttask" depends = "proguard">
    <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.">
      <condition>
        <not>
          <available file="${ant.jar}"/>
        </not>
      </condition>
    </fail>

    <javac nowarn      = "true"
           deprecation = "false"
           classpath   = "${ant.jar}"
           srcdir      = "${src}"
           destdir     = "${classes}"
           includes    = "proguard/ant/ProGuardTask.java">
      <compilerarg value = "-Xlint:none"/>
    </javac>

    <copy todir = "${classes}">
      <fileset dir = "${src}">
        <include name = "proguard/ant/*.properties"/>
        <include name = "proguard/ant/*.png"/>
        <include name = "proguard/ant/*.gif"/>
        <include name = "proguard/ant/*.pro"/>
      </fileset>
    </copy>

    <jar jarfile  = "${lib}/proguard.jar"
         update   = "true"
         basedir  = "${classes}"
         includes = "proguard/ant/**"/>
  </target>

  <target name = "wtkplugin" depends = "proguard">
    <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.">
      <condition>
        <not>
          <available file="${wtk.jar}"/>
        </not>
      </condition>
    </fail>

    <javac nowarn      = "true"
           deprecation = "false"
           classpath   = "${wtk.jar}"
           srcdir      = "${src}"
           destdir     = "${classes}"
           includes    = "proguard/wtk/ProGuardObfuscator.java">
      <compilerarg value = "-Xlint:none"/>
    </javac>

    <copy todir = "${classes}">
      <fileset dir = "${src}">
        <include name = "proguard/wtk/*.properties"/>
        <include name = "proguard/wtk/*.png"/>
        <include name = "proguard/wtk/*.gif"/>
        <include name = "proguard/wtk/*.pro"/>
      </fileset>
    </copy>

    <jar jarfile  = "${lib}/proguard.jar"
         update   = "true"
         basedir  = "${classes}"
         includes = "proguard/wtk/**"/>
  </target>

  <target name = "classes">
    <mkdir dir = "${classes}"/>
  </target>

  <target name = "lib">
    <mkdir dir = "${lib}"/>
  </target>

  <target name = "clean">
    <delete>
      <fileset dir = "${classes}"/>
      <fileset dir = "${lib}"/>
    </delete>
  </target>
</project>