|
1 <!-- |
|
2 # |
|
3 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 # All rights reserved. |
|
5 # This component and the accompanying materials are made available |
|
6 # under the terms of the License "Eclipse Public License v1.0" |
|
7 # which accompanies this distribution, and is available |
|
8 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 # |
|
10 # Initial Contributors: |
|
11 # Nokia Corporation - initial contribution. |
|
12 # |
|
13 # Contributors: |
|
14 # |
|
15 # Description: |
|
16 # |
|
17 --> |
|
18 |
|
19 <project name="openlcduitests" default="createJars" basedir="."> |
|
20 |
|
21 <description> |
|
22 Builds OpenLcdui Tests on eSWT |
|
23 </description> |
|
24 |
|
25 <import file="../../../../build/utilities.xml"/> |
|
26 |
|
27 <!-- Needed by the utilities.xml. See the description form the utilities.xml |
|
28 file --> |
|
29 |
|
30 <property name="java.src.paths" value="../src:../src_j2me"/> |
|
31 |
|
32 <!--default bootclasspath is cldc, later if added cdc to the calsspath, it always refer to cldc classes |
|
33 if the classes are common in both configuarations. To fix this issue, bootclasspath is overriden--> |
|
34 <property name="bootclasspath" value="${bootclasspath.cdc}"/> |
|
35 |
|
36 <target name="compile"> |
|
37 <omj.javac classpath="../junit-3.8.1.1.jar:${impl.cldc.jar}:${bcp.dest.directory}/eswtuitestutils.jar" excludes="**/Test_com_ibm_ugl_UGLCompatibility.java"/> |
|
38 </target> |
|
39 |
|
40 <!-- This empty call is needed to avoid OMJ tool to add this component class to cldc jar --> |
|
41 <target name="add.classes.to.collection.jar"/> |
|
42 |
|
43 <target name="createJars" depends="deploy"> |
|
44 <jar jarfile="${bcp.dest.directory}/openlcduitests.jar"> |
|
45 <fileset dir="${classes.collection.dir}" includes="**/*.class"/> |
|
46 <fileset dir="../res"/> |
|
47 </jar> |
|
48 <copy file="../junit-3.8.1.1.jar" todir="${bcp.dest.directory}"/> |
|
49 <copy file="../junit-3.8.1.1.odc" todir="${bcp.dest.directory}"/> |
|
50 <antcall target="appendODC"/> |
|
51 </target> |
|
52 |
|
53 <target name="appendODC" > |
|
54 <!-- Appends openlcduitests.odc, junit-3.8.1.1.odc, openlcdui.odc and javanokiaui.odc |
|
55 if not present in installerodclist30 file --> |
|
56 <loadfile srcFile="${epocroot}epoc32/data/z/resource/java/installerodclist" property="junitTests"> |
|
57 <filterchain> |
|
58 <linecontains> |
|
59 <contains value="junit-3.8.1.1.odc"/> |
|
60 </linecontains> |
|
61 </filterchain> |
|
62 </loadfile> |
|
63 <antcall target="appendJunit"/> |
|
64 |
|
65 <loadfile srcFile="${epocroot}epoc32/data/z/resource/java/installerodclist" property="lcduiTests"> |
|
66 <filterchain> |
|
67 <linecontains> |
|
68 <contains value="${component.dir}.odc"/> |
|
69 </linecontains> |
|
70 </filterchain> |
|
71 </loadfile> |
|
72 <antcall target="appendLcduiTests"/> |
|
73 |
|
74 <loadfile srcFile="${epocroot}epoc32/data/z/resource/java/installerodclist" property="lcduiODC"> |
|
75 <filterchain> |
|
76 <linecontains> |
|
77 <contains value="openlcdui.odc"/> |
|
78 </linecontains> |
|
79 </filterchain> |
|
80 </loadfile> |
|
81 <antcall target="appendLcdui"/> |
|
82 |
|
83 <loadfile srcFile="${epocroot}epoc32/data/z/resource/java/installerodclist" property="uiapiODC"> |
|
84 <filterchain> |
|
85 <linecontains> |
|
86 <contains value="javanokiaui.odc"/> |
|
87 </linecontains> |
|
88 </filterchain> |
|
89 </loadfile> |
|
90 <antcall target="appendUIAPI"/> |
|
91 </target> |
|
92 |
|
93 <target name="appendJunit" unless="junitTests"> |
|
94 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">junit-3.8.1.1.odc${line.separator}</concat> |
|
95 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">junit-3.8.1.1.jar${line.separator}</concat> |
|
96 </target> |
|
97 |
|
98 <target name="appendLcduiTests" unless="lcduiTests"> |
|
99 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">${component.dir}.odc${line.separator}</concat> |
|
100 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">${component.dir}.jar${line.separator}</concat> |
|
101 </target> |
|
102 |
|
103 <target name="appendLcdui" unless="lcduiODC"> |
|
104 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">openlcdui.odc${line.separator}</concat> |
|
105 </target> |
|
106 |
|
107 <target name="appendUIAPI" unless="uiapiODC"> |
|
108 <concat destfile="${epocroot}epoc32/data/z/resource/java/installerodclist" append="true">javanokiaui.odc${line.separator}</concat> |
|
109 </target> |
|
110 |
|
111 </project> |