buildframework/helium/builder/build.xml
author wbernard
Sun, 10 Oct 2010 15:22:15 +0300
changeset 645 b8d81fa19e7d
parent 628 7c4a911dc066
permissions -rw-r--r--
helium_12.0.0-63b64366f9cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : build.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    23
<project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib" xmlns:hlm="http://www.nokia.com/helium">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <property environment="env" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <import file="delivery.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    28
    <!-- Ensuring that only Ant 1.7.0 is in use. 
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
        <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
            <contains string="${ant.version}" substring="1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
        </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
        <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
            <fail message="Your current ant version is ${ant.version}, you must use 1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
        </then>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    36
    </ac:if>            -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    <condition property="platform" value="win32" else="unix">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
        <os family="windows"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    </condition>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    41
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
    <dirname property="builder.dir" file="${ant.file.helium-builder}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    <property name="source.root.dir" location="${builder.dir}/.." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    <property name="build.temp.dir" location="${source.root.dir}/build" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    <property name="components.temp.dir" location="${build.temp.dir}/components" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    <property name="component" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
    <property name="component.type" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
    <property name="component.root" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
    <property name="config" value="sf" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
    <property name="sf.delivery.zip" location="${build.temp.dir}/helium-sf-src.zip" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    <property name="binary.delivery.zip" location="${build.temp.dir}/helium-bin.zip" />
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    52
    <property name="doc.build.dir" location="${build.temp.dir}/doc/api" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
    <fileset id="ant.build.files" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
        <include name="${component.root}/${component.type}/${component}/build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
        <exclude name="*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
        <exclude name="*/*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
        <exclude name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
        <exclude name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <exclude name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        <exclude name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
        <exclude name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
        <exclude name="licences/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
        <exclude name="tests/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
        <exclude name="build/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
    </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
  
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    68
    <!-- Add macro in order to avoid the use of failonerror="false" in the delete task -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    69
    <macrodef name="deleteIfDirExists">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    70
        <attribute name="dir"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    71
        <sequential>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    72
            <ac:if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    73
                <available file="@{dir}" type="dir" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    74
                <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    75
                    <delete dir="@{dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    76
                </then> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    77
            </ac:if>        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    78
        </sequential>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    79
    </macrodef>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    80
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    81
   
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
    <target name="cleanup" description="Cleanup (delete the temp build directory)">
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    83
        <deleteIfDirExists dir="${build.temp.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    84
        <deleteIfDirExists dir="${source.root.dir}/external/antlibs2" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    85
        <deleteIfDirExists dir="${source.root.dir}/external/python/lib/auto" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    88
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
    <target name="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
        <ivy:buildlist reference="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
            <fileset refid="ant.build.files"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
        </ivy:buildlist>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    95
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
    <target name="report" depends="get-build-list" description="Create Ivy report for each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
        <subant target="report" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
  
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   102
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   103
    <target name="compile" depends="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
        <subant target="compile" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   110
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   111
    <target name="build" depends="get-build-list" description="Build each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
        <subant target="package" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   114
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   115
            <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   116
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   117
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   119
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   120
    <target name="clean" depends="get-build-list" description="Run clean on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   121
        <subant target="clean" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   122
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   123
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   124
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   125
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   126
  
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   127
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   128
    <target name="test" depends="get-build-list,build" description="Run test on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   129
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   130
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   131
            <sequential>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   132
                <ac:trycatch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   133
                    <try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   134
                        <echo>Start component test set: @{file}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   135
                        <ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   136
                            <property name="builder.dir" location="${builder.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   137
                            <property name="source.root.dir" location="${source.root.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   138
                        </ant>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   139
                        <echo>End component test set: @{file}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   140
                    </try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   141
                    <catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   142
                        <property name="quality.thrown" value="@{file}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   143
                    </catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   144
                </ac:trycatch>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   145
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   146
        </ac:for>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   147
        <ac:if>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   148
            <isset property="quality.thrown"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   149
            <then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   150
                <fail message="${quality.thrown} failed"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   151
            </then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   152
        </ac:if> 
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   153
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   154
    <!-- TODO: remove after CI tools are cleaned up -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   155
    <target name="unittest" depends="test"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   156
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   157
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   158
    <target name="junit" depends="get-build-list" description="Run JUnit tests on each component">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   159
        <subant target="junit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   160
            <property name="builder.dir" location="${builder.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   161
            <property name="source.root.dir" location="${source.root.dir}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   162
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   163
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   164
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   165
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   166
    <target name="antunit" depends="get-build-list" description="Run AntUnit tests on each component">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   167
        <subant target="antunit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   168
            <property name="builder.dir" location="${builder.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   169
            <property name="source.root.dir" location="${source.root.dir}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   170
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   171
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   172
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   173
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   174
    <target name="quality" depends="get-build-list" description="Run quality checks on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   175
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   176
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   177
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   178
                <echo>Checking @{file}</echo>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   179
                <ac:trycatch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   180
                    <try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   181
                        <ant antfile="@{file}" dir="@{file}/.." target="quality" inheritAll="false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   182
                            <property name="builder.dir" location="${builder.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   183
                            <property name="source.root.dir" value="${source.root.dir}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   184
                            <property name="platform" value="${platform}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   185
                        </ant>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   186
                    </try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   187
                    <catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   188
                        <property name="quality.thrown" value="@{file}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   189
                    </catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   190
                </ac:trycatch>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   191
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   192
        </ac:for>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   193
        <ac:if>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   194
            <isset property="quality.thrown"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   195
            <then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   196
                <fail message="${quality.thrown} failed"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   197
            </then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   198
        </ac:if>  
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   199
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   200
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   201
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   202
    <target name="ci" depends="quality"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   203
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   204
    <target name="checkstyle" depends="get-build-list" description="Run checkstyle on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   205
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   206
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   207
            <sequential>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   208
                <ac:trycatch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   209
                    <try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   210
                        <ant antfile="@{file}" dir="@{file}/.." target="checkstyle" inheritAll="false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   211
                            <property name="builder.dir" location="${builder.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   212
                            <property name="source.root.dir" value="${source.root.dir}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   213
                            <property name="platform" value="${platform}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   214
                        </ant>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   215
                    </try>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   216
                    <catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   217
                        <property name="quality.thrown" value="@{file}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   218
                    </catch>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   219
                </ac:trycatch>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   220
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   221
        </ac:for>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   222
        <ac:if>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   223
            <isset property="quality.thrown"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   224
            <then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   225
                <fail message="${quality.thrown} failed"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   226
            </then>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   227
        </ac:if> 
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   228
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   229
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   230
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   231
    <target name="get-deps" description="Retrieving Helium dependencies">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   232
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   233
            <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   234
                <isset property="config" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   235
            </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   236
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   237
                <fail message="config is not defined." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   238
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   239
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   240
        <echo>Using ${config} configuration.</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   241
        <delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   242
            <fileset dir="${build.temp.dir}" includes="ivy/com.nokia.helium.config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   243
        </delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   244
        <ivy:settings file="${source.root.dir}/${config}/settings/ivysettings.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   245
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   246
        <!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   247
        <ivy:resolve organisation="com.nokia.helium.config" module="helium-${config}-config" revision="1.0" inline="true" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   248
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   249
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   250
            inline="true" type="jar"
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   251
            pattern="${source.root.dir}/external/antlibs2/[artifact]-[revision].[ext]" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   252
        <delete>
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   253
            <fileset dir="${source.root.dir}" includes="external/python/lib/auto/zipnotsafe/**" />
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   254
        </delete>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   255
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   256
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   257
            inline="true" type="egg"
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   258
            pattern="${source.root.dir}/external/python/lib/auto/zipsafe/[artifact]-[revision].[ext]" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   259
        <ivy:retrieve sync="false" conf="default" organisation="com.nokia.helium.config"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   260
            module="helium-${config}-config" revision="1.0"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   261
            inline="true" type="py"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   262
            pattern="${source.root.dir}/external/python/lib/auto/[artifact].[ext]" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   263
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   264
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   265
        <path id="egg.deps.fileset" >
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   266
            <dirset dir="${source.root.dir}/external/python/lib/auto" includes="*/*.egg" excludes="*/jython*.egg" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   267
            <fileset dir="${source.root.dir}/external/python/lib/auto" includes="*/*.egg" excludes="*/jython*.egg" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   268
        </path>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   269
        <fmpp sourceFile="template/easy-install.pth.ftl" outputFile="${source.root.dir}/external/python/lib/auto/easy-install.pth">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   270
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   271
                project: antProject()
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   272
                ant: antProperties()
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   273
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   274
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   275
        
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   276
        <path id="egg.hlm.deps.fileset">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   277
            <dirset dir="${source.root.dir}">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   278
                <include name="external/python/lib/**/*.egg" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   279
                <exclude name="**/*amara*" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   280
                <exclude name="**/2.5/**" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   281
            </dirset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   282
            <fileset dir="${source.root.dir}">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   283
                <include name="external/python/**/*.egg" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   284
                <exclude name="**/*amara*" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   285
                <exclude name="**/2.5/**" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   286
            </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   287
        </path>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   288
        <fmpp sourceFile="template/configure_jython.bat.ftl" outputFile="${source.root.dir}/external/python/configure_jython.bat">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   289
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   290
                project: antProject()
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   291
                ant: antProperties()
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   292
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   293
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   294
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   295
        <fmpp sourceFile="template/configure_jython.sh.ftl" outputFile="${source.root.dir}/external/python/configure_jython.sh">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   296
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   297
                project: antProject()
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   298
                ant: antProperties()
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   299
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   300
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   301
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   302
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   303
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   304
    <target name="build-helium-docs" unless="skip.docs">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   305
        <exec osfamily="windows" executable="${source.root.dir}/hlm.bat" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   306
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   307
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   308
        <exec osfamily="unix" executable="${source.root.dir}/hlm" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   309
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   310
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   311
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   312
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   313
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   314
    <target name="zip-releasable">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   315
        <delete file="${binary.delivery.zip}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   316
        <zip destfile="${binary.delivery.zip}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   317
            <zipfileset id="zip.content" dir="${source.root.dir}" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   318
                <include name="hlm.bat" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   319
                <include name="helium*.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   320
                <include name="build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   321
                <include name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   322
                <include name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   323
                <include name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   324
                <include name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   325
                <include name="licenses/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   326
                <include name="tests/minibuilds/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   327
                <exclude name="config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   328
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   329
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   330
            <zipfileset id="zip.doc" dir="${source.root.dir}/build" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   331
                <include name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   332
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   333
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   334
            <zipfileset id="zip.executable" dir="${source.root.dir}" prefix="helium" filemode="755">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   335
                <include name="hlm" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   336
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   337
        </zip>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   338
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   339
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   340
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   341
    <target name="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   342
        <exec executable="hg" outputproperty="hg.helium.revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   343
            <arg value="id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   344
            <arg value="--id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   345
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   346
        <ac:propertyregex property="helium.revision"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   347
                    input="${hg.helium.revision}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   348
                    regexp="([a-f0-9]+).*"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   349
                    replace="\1"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   350
                    casesensitive="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   351
        <echo message="Revision set to: ${helium.revision}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   352
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   353
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   354
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   355
    <target name="update-version" depends="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   356
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   357
            <available file="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   358
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   359
                <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   360
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   361
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   362
        <copy file="${source.root.dir}/config/version.txt" tofile="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   363
        <property file="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   364
        <propertyfile file="${source.root.dir}/config/version.txt" comment="Helium version - DO NOT EDIT">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   365
            <entry key="helium.version" value="${helium.version}-r${helium.revision}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   366
        </propertyfile>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   367
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   368
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   369
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   370
    <target name="restore-version">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   371
        <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   372
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   373
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   374
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   375
    <target name="create-releasable" depends="get-deps,update-version,build-helium-docs,zip-releasable,restore-version" description="Create releasable binary package"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   376
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   377
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   378
    <target name="textdoc">
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   379
        <deleteIfDirExists dir="${build.temp.dir}/doc/doctmp" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   380
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   381
            <fileset dir="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   382
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   383
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true" flatten="true">
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   384
            <fileset dir="${source.root.dir}" includes="*/java/*/**/*.rst" excludes="*/java/*/doc/**/*.rst" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   385
            <fileset dir="${source.root.dir}" includes="*/python/*/**/*.rst" excludes="*/python/*/doc/**/*.rst" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   386
            <fileset dir="${source.root.dir}" includes="*/java/*/doc/" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   387
            <fileset dir="${source.root.dir}" includes="*/python/*/doc/" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   388
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   389
        <rstMacro version="1.0" src="${build.temp.dir}/doc/doctmp"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   390
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   391
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   392
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   393
    <!-- Macro to generate html docs from rst. -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   394
    <macrodef name="rstMacro">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   395
        <attribute name="version"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   396
        <attribute name="src" default="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   397
        <attribute name="output" default="${build.temp.dir}/doc/text"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   398
        <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   399
            <property name="sphinx.lib.dir" location="${builder.dir}/tools/sphinx/Sphinx-0.5.1-py2.5.egg/sphinx" />
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   400
            <exec executable="python" failonerror="true">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   401
                <env key="PYTHONPATH" path="${builder.dir}/tools/sphinx" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   402
                <arg file="${builder.dir}/tools/sphinx/sphinx-build.py"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   403
                <arg value="-b" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   404
                <arg value="html" />            
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   405
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   406
                <arg value="version=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   407
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   408
                <arg value="release=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   409
                <arg file="@{src}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   410
                <arg file="@{output}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   411
            </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   412
        </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   413
    </macrodef>
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   414
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   415
    <!-- Generate Ant API documentation using jeldoclet. -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   416
    <target name="jeldoclet">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   417
        <path id="doclet-classpath">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   418
            <fileset dir="${build.temp.dir}" includes="**/*.jar"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   419
            <pathelement path="${java.class.path}/"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   420
        </path>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   421
        <javadoc destdir="${build.temp.dir}"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   422
           docletpathref="doclet-classpath"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   423
           useexternalfile="true"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   424
           failonerror="true">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   425
            <sourcepath>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   426
                <dirset dir="${source.root.dir}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   427
                    <include name="*/java/*/src"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   428
                </dirset>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   429
            </sourcepath>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   430
            <doclet name="com.jeldoclet.JELDoclet"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   431
        </javadoc>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   432
        <fmpp sourceFile="${builder.dir}/tools/antdoclet/doclet_list.rst.ftl"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   433
            outputFile="${build.temp.dir}/temp/doc/helium-antlib/tasks.rst">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   434
            <data expandProperties="yes">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   435
                doc: xml(${build.temp.dir}/jel.xml)
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   436
                ant: antProperties()
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   437
            </data>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   438
        </fmpp>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
   439
    </target>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   440
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   441
</project>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   442
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   443