Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ant build file #18

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source.dir=.
build.dir=build
dist=dist
36 changes: 36 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="JSON-Java" default="dist">

<property file="build.properties" />

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
</target>

<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${source.dir} into ${build.dir} -->
<javac srcdir="${source.dir}" destdir="${build.dir}" debug="on">
</javac>
</target>

<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>

<!-- Put everything in ${build.dir} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/java-json-${DSTAMP}.jar" >
<fileset dir="${build.dir}"/>
</jar>
</target>

<target name="clean" description="clean up" >
<!-- Delete the ${build.dir} and ${dist} directory trees -->
<delete dir="${build.dir}"/>
<delete dir="${dist}"/>
</target>
</project>