0,0 → 1,70 |
<?xml version="1.0" encoding="utf-8"?> |
|
<project name="pluggablejs" default="dist" basedir="."> |
<description>Pluggable JS framework</description> |
|
<property name="src" location="src"/> |
<property name="build" location="obj"/> |
<property name="dist" location="dist"/> |
<property name="release" location="release"/> |
<property name="depends" location="lib"/> |
|
<property name="version" value="1.1.0"/> |
<property name="jarbasename" value="pluggablejs-${version}build" /><!-- followed by build.number, can't resolve yet --> |
|
<target name="init"> |
<!-- Create timestamp, sets TODAY (full, human), DSTAMP (yyyymmdd) and |
TSTAMP (hhmm) --> |
<tstamp/> |
<!-- Build directory structure --> |
<mkdir dir="${build}" /> |
</target> |
|
<target name="compile.real" depends="init" description="Source compilation"> |
<!-- from ${src} to ${build} --> |
<javac srcdir="${src}" destdir="${build}" /> |
</target> |
|
<target name="compile" depends="compile.real"> |
<!-- Build finished, update number --> |
<buildnumber file="build.num"/> |
</target> |
|
<target name="compile.downstream" depends="compile.real" |
description="Compilation without build number increase"> |
<!-- Forge build number, buildnumber must be called to have |
${build.number} defined --> |
<copy file="build.num" tofile="build.number" /> |
<buildnumber file="build.number" /> |
<delete file="build.number" /> |
</target> |
|
<target name="dist.real" description="Generate the distribution"> |
<mkdir dir="${dist}/"/> |
|
<jar jarfile="${dist}/${jarbasename}${build.number}.jar" basedir="${build}"> |
<!-- <classpath refid="${third.party.libs}" /> --> |
<manifest> |
<attribute name="X-COMMENT" value="Standard build" /> |
<attribute name="Build-Date" value="${TODAY}"/> |
<!-- Package.getImplementationVersion() --> |
<attribute name="Implementation-Version" |
value="${version}-build${build.number}" /> |
<!-- |
<attribute name="Class-Path" value="${manifest.classpath}" /> |
--> |
</manifest> |
</jar> |
<jar destfile="${dist}/${jarbasename}${build.number}-src.jar" basedir="${src}"/> |
</target> |
|
<target name="dist.downstream" depends="compile.downstream, dist.real" /> |
<target name="dist" depends="compile, dist.real" /> |
|
<target name="clean" description="Clean up"> |
<delete dir="${build}" /> |
<delete dir="${dist}" /> |
<delete dir="${release}" /> |
</target> |
</project> |
<!-- vim:set ts=4 et noai: --> |