Path: blob/master/test/functional/Java18andUp/build.xml
6000 views
<?xml version="1.0"?>1<!--2Copyright (c) 2021, 2021 IBM Corp. and others34This program and the accompanying materials are made available under5the terms of the Eclipse Public License 2.0 which accompanies this6distribution and is available at https://www.eclipse.org/legal/epl-2.0/7or the Apache License, Version 2.0 which accompanies this distribution and8is available at https://www.apache.org/licenses/LICENSE-2.0.910This Source Code may also be made available under the following11Secondary Licenses when the conditions for such availability set12forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13General Public License, version 2 with the GNU Classpath14Exception [1] and GNU General Public License, version 2 with the15OpenJDK Assembly Exception [2].1617[1] https://www.gnu.org/software/classpath/license.html18[2] http://openjdk.java.net/legal/assembly-exception.html1920SPDX-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-exception21-->22<project name="Java18AndUp" default="build" basedir=".">23<taskdef resource='net/sf/antcontrib/antlib.xml' />24<description>25Tests for Java 18 and up26</description>2728<!-- set global properties for this build -->29<property name="DEST" value="${BUILD_ROOT}/functional/Java18andUp" />3031<!--Properties for this particular build-->32<property name="src" location="src" />33<property name="build" location="bin" />34<property name="LIB" value="asm,testng,jcommander" />35<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />3637<target name="init">38<mkdir dir="${DEST}" />39<mkdir dir="${build}" />40</target>4142<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source">43<echo>Ant version is ${ant.version}</echo>44<echo>============COMPILER SETTINGS============</echo>45<echo>===fork: yes</echo>46<echo>===executable: ${compiler.javac}</echo>47<echo>===debug: on</echo>48<echo>===destdir: ${DEST}</echo>4950<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">51<src path="${src}" />52<compilerarg line='--add-modules jdk.incubator.foreign' />53<compilerarg line='--add-opens jdk.incubator.foreign/jdk.internal.foreign=ALL-UNNAMED' />54<classpath>55<pathelement location="${LIB_DIR}/testng.jar" />56<pathelement location="${LIB_DIR}/jcommander.jar" />57<pathelement location="${LIB_DIR}/asm.jar" />58<pathelement location="${build}" />59</classpath>60</javac>61</target>6263<target name="dist" depends="compile" description="generate the distribution">64<mkdir dir="${DEST}" />65<jar jarfile="${DEST}/GeneralTest.jar" filesonly="true">66<fileset dir="${build}" />67<fileset dir="${src}/../" includes="*.properties,*.xml" />68</jar>69<copy todir="${DEST}">70<fileset dir="${src}/../" includes="*.xml" />71<fileset dir="${src}/../" includes="*.mk" />72</copy>73</target>7475<target name="build">76<if>77<not>78<matches string="${JDK_VERSION}" pattern="^(8|9|10|11|12|13|14|15|16|17)$$" />79</not>80<then>81<antcall target="clean" inheritall="true" />82</then>83</if>84</target>8586<target name="clean" depends="dist" description="clean up">87<delete dir="${build}" />88</target>89</project>909192