blob: 15f9b3d7ebebaac7197905c6d3a79195fae3b656 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="fxgutils" default="main" basedir=".">
<property name="FLEX_HOME" location="../.."/>
<!-- properties -->
<property file="${FLEX_HOME}/build.properties" />
<property name="lib.dir" value="${FLEX_HOME}/lib"/>
<property name="module.dir" value="${basedir}"/>
<property name="module.src" value="${module.dir}/src/java"/>
<property name="javac.src" value="1.5"/>
<property name="module.classes" value="${module.dir}/classes"/>
<property name="build.number" value=""/>
<target name="main" depends="clean,dev" description="cleans and runs the full build"/>
<target name="dev" depends="jar" description="runs src.depend build for development"/>
<path id="fxgutils.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile" depends="prepare,run-depend" description="compile">
<echo message="basedir ${basedir} module.dir ${module.dir}"/>
<javac source="${javac.src}" target="${javac.src}" debug="${src.debug}" destdir="${module.classes}" srcdir="${module.src}"
includes="**/*.java" >
<classpath refid="fxgutils.classpath"/>
</javac>
<copy todir="${module.classes}">
<fileset dir="${module.src}" includes="**/*.properties"/>
</copy>
</target>
<target name="jar" depends="compile" description="compile and create fxgutils.jar">
<mkdir dir="${lib.dir}" />
<mkdir dir="${module.classes}/META-INF"/>
<copy file="${FLEX_HOME}/licenseParts/LICENSE.base" tofile="${module.classes}/META-INF/LICENSE"/>
<copy file="${FLEX_HOME}/licenseParts/NOTICE.base" tofile="${module.classes}/META-INF/NOTICE"/>
<echo message="Building lib/fxgutils.jar"/>
<jar file="${lib.dir}/fxgutils.jar" basedir="${module.classes}" includes="**/*">
<manifest>
<attribute name="Sealed" value="${manifest.sealed}"/>
<attribute name="Implementation-Title" value="${manifest.Implementation-Title} - FXG Utility Library"/>
<attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
<attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
<attribute name="Implementation-Vendor-Id" value="${manifest.Implementation-Vendor-Id}"/>
</manifest>
</jar>
</target>
<target name="clean" description="clean">
<delete failonerror="false" includeEmptyDirs="true">
<fileset file="${lib.dir}/fxgutils.jar"/>
<fileset dir="${module.classes}">
<include name="**/*"/>
</fileset>
</delete>
<delete failonerror="false" dir="${module.classes}"/>
</target>
<!-- private helper targets -->
<target name="prepare">
<mkdir dir="${lib.dir}"/>
<mkdir dir="${module.classes}"/>
</target>
<!-- if src.depend is specified, delete the stuff which has changed so it can be recompiled -->
<target name="run-depend" if="src.depend">
<echo level="info" message="Removing class files that changed and dependent class files."/>
<depend cache="${module.classes}" srcdir="${module.src}" destdir="${module.classes}"/>
</target>
</project>