forked from rkalla/imgscalr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
53 lines (43 loc) · 2.14 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
<project name="imgscalr Java Library" default="dist">
<property name="dir.src" value="src/main/java" />
<property name="dir.bin" value="bin" />
<property name="dir.dist" value="dist" />
<property name="dir.javadoc" value="${dir.dist}/javadoc" />
<property name="version.major" value="3" />
<property name="version.minor" value="0" />
<property name="name.file" value="imgscalr-lib" />
<property name="name.file.javadoc" value="${name.file}-${version.major}.${version.minor}-javadoc.jar" />
<property name="name.file.src" value="${name.file}-${version.major}.${version.minor}-sources.jar" />
<target name="clean">
<delete dir="${dir.bin}" />
<delete dir="${dir.dist}" />
<mkdir dir="${dir.bin}" />
<mkdir dir="${dir.dist}" />
</target>
<target name="compile" depends="clean">
<javac srcdir="${dir.src}" destdir="${dir.bin}" debug="true" source="1.5" />
<copy todir="${dir.bin}">
<fileset dir="${dir.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="javadoc">
<delete dir="${dir.javadoc}" />
<mkdir dir="${dir.javadoc}" />
<javadoc sourcepath="${dir.src}" destdir="${dir.javadoc}" author="true" windowtitle="imgscalr v${version.major}.${version.minor} - Java Image Scaling Library" footer="Copyright 2011 The Buzz Media, LLC" link="http://download.oracle.com/javase/1.5.0/docs/api/" linksource="true" package="true" source="1.5" use="true" />
</target>
<target name="jar" depends="compile">
<jar basedir="${dir.bin}" destfile="${dir.dist}/${name.file}-${version.major}.${version.minor}.jar" compress="no" />
</target>
<target name="src">
<delete file="${dir.dist}/${name.file}-${version.major}.${version.minor}-src.zip" />
<jar compress="yes" basedir="${dir.src}" destfile="${dir.dist}/${name.file.src}" />
</target>
<target name="dist" depends="compile,javadoc,jar,src">
<copy file="README" todir="${dir.dist}" />
<copy file="LICENSE" todir="${dir.dist}" />
<jar compress="yes" basedir="${dir.javadoc}" destfile="${dir.dist}/${name.file.javadoc}" />
<zip compress="yes" basedir="${dir.dist}" destfile="${dir.dist}/${name.file}-${version.major}.${version.minor}.zip" />
</target>
</project>