You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
api-themoviedb/themoviedbapi/build.xml

78 lines
3.1 KiB
XML

<?xml version="1.0"?>
<project name="themoviedbapi" default="dist" basedir=".">
<target name="init">
<property name="project" value="TheMovieDB API" />
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<!-- Get the revision information from SVN -->
<property environment="env" />
<condition property="revision" value="${env.SVN_REVISION}" else="0000">
<isset property="env.SVN_REVISION" />
</condition>
</target>
<target name="clean" depends="init" description="Delete the directories for a clean build">
<delete dir="${build}" />
<delete dir="${dist}" />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
</target>
<target name="version" description="Write out the version file">
<tstamp>
<format property="builddate" pattern="yyyy-MM-dd HH:mm:ss" locale="en"/>
</tstamp>
<!-- Write out the readme information file -->
<echo file="${dist}/${ant.project.name}_version.txt" append="false">${project}${line.separator}</echo>
<echo file="${dist}/${ant.project.name}_version.txt" append="true">Build Date: ${builddate}${line.separator}</echo>
<echo file="${dist}/${ant.project.name}_version.txt" append="true">Revision: r${revision}${line.separator}</echo>
<copy file="${src}/readme.txt" tofile="${dist}/${ant.project.name}_readme.txt" overwrite="true"/>
<manifest file="MANIFEST.MF">
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title" value="${project}" />
<attribute name="Implementation-Version" value="${revision}" />
<attribute name="Implementation-Title" value="${builddate}" />
</manifest>
</target>
<target name="compile" depends="clean" description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="compile, version" description="generate the distribution" >
<jar jarfile="${dist}/${ant.project.name}.jar" manifest="MANIFEST.MF">
<!-- Put everything in ${build} into the jar file -->
<fileset dir="${build}">
<include name="**/*.class"/>
</fileset>
<!-- Add files from the ${src} too -->
<fileset dir="${src}">
<include name="**/*.java"/>
</fileset>
</jar>
<zip basedir="dist" destfile="${dist}/${ant.project.name}_r${revision}.zip" excludes="*.zip" level="9" comment="${project}${line.separator}Build Date: ${builddate}${line.separator}Revision: r${revision}${line.separator}"/>
<delete>
<fileset dir="${dist}">
<exclude name="*.zip"/>
<exclude name="*.jar"/>
</fileset>
</delete>
</target>
</project>