Ignore:
Timestamp:
2009-03-19T13:26:29+01:00 (16 years ago)
Author:
stoecker
Message:

cleanup build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/grid/build.xml

    r12780 r14128  
    11<project name="grid" default="dist" basedir=".">
    2 <!-- compilation properties -->
    3     <property name="josm.build.dir"   value="../../core"/>
    4     <property name="josm.home.dir"    value="${user.home}/.josm"/>
    5     <property name="josm"         location="../../core/dist/josm-custom.jar" />
    6     <property name="plugin.build.dir" value="build"/>
    7     <property name="plugin.dist.dir"  value="../../dist"/>
    8     <property name="plugin.name"      value="${ant.project.name}"/>
    9     <property name="plugin.jar"       value="../../dist/${plugin.name}.jar"/>
    10 <!-- point to your JOSM directory -->
    11     <property name="josm" location="${josm.build.dir}/dist/josm-custom.jar" />
     2    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     3    <property name="plugin.dist.dir"        value="../../dist"/>
     4    <property name="plugin.build.dir"       value="build"/>
     5    <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    126    <property name="ant.build.javac.target" value="1.5"/>
    137    <target name="init">
    14         <mkdir dir="build"></mkdir>
    15         <mkdir dir="dist"></mkdir>
     8        <mkdir dir="${plugin.build.dir}"/>
    169    </target>
    1710    <target name="compile" depends="init">
    1811        <echo message="creating ${plugin.jar}"/>
    19         <javac srcdir="src" classpath="${josm}" debug="true" destdir="build">
    20             <include name="**/*.java" />
     12        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     13            <compilerarg value="-Xlint:deprecation"/>
     14            <compilerarg value="-Xlint:unchecked"/>
    2115        </javac>
    2216    </target>
    23     <target name="dist" depends="compile">
    24         <copy todir="build/images" >
    25             <fileset dir="images" />
     17    <target name="dist" depends="compile,revision">
     18        <copy todir="${plugin.build.dir}/images">
     19            <fileset dir="images"/>
    2620        </copy>
    27         <jar destfile="${plugin.jar}" basedir="build">
     21        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    2822            <manifest>
    2923                <attribute name="Plugin-Class" value="grid.GridPlugin" />
     24                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    3025                <attribute name="Plugin-Description" value="Provide a background layer that displays a map grid" />
     26                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3127            </manifest>
    3228        </jar>
    3329    </target>
     30    <target name="revision">
     31        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     32            <env key="LANG" value="C"/>
     33            <arg value="info"/>
     34            <arg value="--xml"/>
     35            <arg value="."/>
     36        </exec>
     37        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     38        <delete file="REVISION"/>
     39    </target>
    3440    <target name="clean">
    35         <delete dir="${plugin.build.dir}" />
    36         <delete file="${plugin.jar}" />
     41        <delete dir="${plugin.build.dir}"/>
     42        <delete file="${plugin.jar}"/>
    3743    </target>
    3844    <target name="install" depends="dist">
    39         <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins"/>
     45        <property environment="env"/>
     46        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     47            <and>
     48                <os family="windows"/>
     49            </and>
     50        </condition>
     51        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    4052    </target>
    4153</project>
Note: See TracChangeset for help on using the changeset viewer.