forked from opticyclic/antdebugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
66 lines (55 loc) · 2.17 KB
/
build.xml
File metadata and controls
66 lines (55 loc) · 2.17 KB
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="ant-debugger" basedir="." default="dist">
<!--TODO: Find a more generic/conventional way to define the IDEA classpath-->
<property name="idea.home" value="C:\__Development\ide\IntelliJ IDEA Community Edition 2016.1"/>
<property name="build.version" value="1.4.0"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="init">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" target="1.8">
<classpath>
<fileset dir="${idea.home}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="${build.dir}/${ant.project.name}-${build.version}.jar">
<manifest>
<attribute name="Implementation-Title" value="${ant.project.name}"/>
<attribute name="Implementation-Version" value="${build.version}"/>
<attribute name="Build-Date" value="${TODAY}"/>
</manifest>
<fileset dir="${build.classes.dir}">
<include name="**/*"/>
</fileset>
<fileset dir=".">
<include name="META-INF/*"/>
</fileset>
</jar>
</target>
<target name="zip-src">
<zip destfile="${build.dir}/${ant.project.name}-src-${build.version}.zip">
<fileset dir=".">
<include name="**/*"/>
<exclude name="build/"/>
<exclude name="out/"/>
<exclude name=".idea/workspace.xml"/>
</fileset>
</zip>
</target>
<target name="dist" depends="jar,zip-src"/>
</project>