buildframework/helium/build-jar.ant.xml
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 13:59:07 +0000
changeset 40 68f68128601f
parent 2 39c28ec933dd
permissions -rwxr-xr-x
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package. 2) Enhance romnibus.pl so that it generate the symbol file for the built rom when invoked by Raptor 3) Make the maksym.pl tool portable for Linux as well as Windows. 4) Remove the of armasm2as.pl from the e32tools component in favour of the copy now exported from sbsv1/e32util.

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : build-jar.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="helium-build-jar" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
    <description>
    Called by hlm-jar.bat to build helium java code
    </description>

    <!-- @property env
    Load all environment variables. -->
    <property environment="env" />

    <!-- @type string
    @scope private
    -->
    <property name="build.temp.dir" location="${env.TEMP}/helium/java" />
    <!-- @type string
    @scope private
    -->
    <property name="src.dir" location="${helium.dir}/tools/common/java/src" />
    <!-- @type string
    @scope private
    -->
    <property name="ext.java.lib.dir" location="${helium.dir}/external/antlibs" />
    <!-- @type string
    @scope private
    -->
    <property name="helium.java.lib.dir" location="${helium.dir}/tools/common/java/lib" />


    <!-- Builds the Java source code for our custom Ant stuff. -->
    <target name="build-java-src" description="Builds the internal Ant custom tasks">
        <delete dir="${build.temp.dir}" />
        <mkdir dir="${build.temp.dir}" />
        <copy todir="${build.temp.dir}/class">
            <fileset dir="${src.dir}">
                <include name="**/*.properties" />
                <include name="**/*.xml" />
            </fileset>
        </copy>
        <javac srcdir="${src.dir}" destdir="${build.temp.dir}/class" source="1.6" target="1.6" debug="true">
            <classpath>
                <fileset dir="${ext.java.lib.dir}" includes="**/*.jar" />
                <fileset dir="${helium.dir}/external/helium-antlib" includes="**/*.jar" />
            </classpath>
            <exclude name="nokia/cruisecontrol/**" />
        </javac>
    </target>


    <!-- Builds the .jar file with our custom Ant tasks and loggers in. -->
    <target name="jar" depends="build-java-src" description="Builds jar for internal Ant custom tasks">
        <property file="${helium.dir}/config/version.txt" />
        <mkdir dir="${build.temp.dir}/lib" />
        <delete file="${build.temp.dir}/lib/nokia_ant.jar" />
        <copy file="${src.dir}/com/nokia/ant/antlib.xml" todir="${build.temp.dir}/class/com/nokia/ant" />

        <jar basedir="${build.temp.dir}/class" destfile="${build.temp.dir}/lib/nokia_ant.jar" update="true">
            <manifest>
                <attribute name="Built-By" value="${user.name}" />
                <section name="common">
                    <attribute name="Implementation-Title" value="Helium" />
                    <attribute name="Implementation-Version" value="${helium.version}" />
                    <attribute name="Implementation-Vendor" value="Nokia" />
                </section>
            </manifest>
        </jar>

        <move file="${build.temp.dir}/lib/nokia_ant.jar" tofile="${helium.java.lib.dir}/nokia_ant.jar" />
    </target>

</project>