Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/Jsr335/build.xml
6000 views
1
<?xml version="1.0"?>
2
<!--
3
Copyright (c) 2016, 2021 IBM Corp. and others
4
5
This program and the accompanying materials are made available under
6
the terms of the Eclipse Public License 2.0 which accompanies this
7
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
or the Apache License, Version 2.0 which accompanies this distribution and
9
is available at https://www.apache.org/licenses/LICENSE-2.0.
10
11
This Source Code may also be made available under the following
12
Secondary Licenses when the conditions for such availability set
13
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
General Public License, version 2 with the GNU Classpath
15
Exception [1] and GNU General Public License, version 2 with the
16
OpenJDK Assembly Exception [2].
17
18
[1] https://www.gnu.org/software/classpath/license.html
19
[2] http://openjdk.java.net/legal/assembly-exception.html
20
21
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
22
-->
23
<project name="J9 JSR335 Test" default="build" basedir=".">
24
<taskdef resource="net/sf/antcontrib/antlib.xml" />
25
<description>
26
Build J9 JSR335 Test
27
</description>
28
29
<!-- set global properties for this build -->
30
<property name="DEST" value="${BUILD_ROOT}/functional/Jsr335" />
31
32
<!--Properties for this particular build-->
33
<property name="src" location="src" />
34
<property name="build" location="bin" />
35
<property name="transformerListener" location="${TEST_ROOT}/Utils/src" />
36
<property name="LIB" value="junit4,asm_all,jcommander,testng" />
37
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />
38
39
<target name="init">
40
<mkdir dir="${DEST}" />
41
<mkdir dir="${build}" />
42
</target>
43
44
<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source">
45
<echo>Ant version is ${ant.version}</echo>
46
<echo>============COMPILER SETTINGS============</echo>
47
<echo>===fork: yes</echo>
48
<echo>===executable: ${compiler.javac}</echo>
49
<echo>===debug: on</echo>
50
<echo>===destdir: ${DEST}</echo>
51
52
<if>
53
<equals arg1="${JDK_VERSION}" arg2="8" />
54
<then>
55
<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src" />
56
<property name="addExports" value="" />
57
</then>
58
<else>
59
<if>
60
<matches string="${JDK_VERSION}" pattern="^1[1-6]$$" />
61
<then>
62
<!-- Java 11-16 -->
63
<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src_110" />
64
</then>
65
<else>
66
<!-- Java 17+ -->
67
<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src_170" />
68
</else>
69
</if>
70
<property name="addExports" value="--add-exports java.base/jdk.internal.misc=ALL-UNNAMED" />
71
</else>
72
</if>
73
74
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
75
<src path="${src}" />
76
<src path="${src_access}" />
77
<src path="${transformerListener}" />
78
<compilerarg line='${addExports}' />
79
<classpath>
80
<pathelement location="${LIB_DIR}/asm-all.jar" />
81
<pathelement location="${LIB_DIR}/testng.jar" />
82
<pathelement location="${LIB_DIR}/jcommander.jar" />
83
<pathelement location="${LIB_DIR}/junit4.jar" />
84
</classpath>
85
</javac>
86
</target>
87
88
<target name="dist" depends="compile" description="generate the distribution">
89
<jar jarfile="${DEST}/Jsr335.jar" filesonly="true">
90
<fileset dir="${build}" />
91
<fileset dir="${src}/../" includes="*.properties,*.xml" />
92
</jar>
93
<copy todir="${DEST}">
94
<fileset dir="${src}/../" includes="*.xml" />
95
<fileset dir="${src}/../" includes="*.mk" />
96
</copy>
97
</target>
98
99
<target name="clean" depends="dist" description="clean up">
100
<!-- Delete the ${build} directory trees -->
101
<delete dir="${build}" />
102
</target>
103
104
<target name="build">
105
<if>
106
<or>
107
<equals arg1="${JDK_IMPL}" arg2="ibm" />
108
<equals arg1="${JDK_IMPL}" arg2="openj9" />
109
</or>
110
<then>
111
<antcall target="clean" inheritall="true" />
112
</then>
113
</if>
114
</target>
115
116
</project>
117
118