annotate antlib/build.xml @ 30:098c4f5507c7

Convert to JDK 15.
author David Barts <n5jrn@me.com>
date Mon, 13 Jun 2022 11:31:49 -0700
parents e90d290a9a8d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
2 <project name="ImagePrep" default="help" basedir=".">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
3 <!-- import all environment variables as env.* -->
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
4 <property environment="env"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
5
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
6 <!-- ensure required environment variables are set -->
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
7 <macrodef name="env-require">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
8 <attribute name="name"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
9 <sequential>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
10 <fail message="Environment variable @{name} not set!">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
11 <condition>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
12 <not><isset property="env.@{name}"/></not>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
13 </condition>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
14 </fail>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
15 </sequential>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
16 </macrodef>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
17 <env-require name="ANT_HOME"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
18 <env-require name="JRE_HOME"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
19 <env-require name="KOTLIN_HOME"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
20
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
21 <!-- define the kotlin task -->
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
22 <property name="kotlin.lib" value="${env.KOTLIN_HOME}/lib"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
23 <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
24 classpath="${kotlin.lib}/kotlin-ant.jar"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
25
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
26 <!-- help message -->
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
27 <target name="help">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
28 <echo>You can use the following targets:</echo>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
29 <echo> </echo>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
30 <echo> help : (default) Prints this message </echo>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
31 <echo> jar : Make JAR file.</echo>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
32 <echo> </echo>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
33 </target>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
34
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
35 <!-- compile *.kt to *.class -->
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
36 <property name="jar.name" value="antlib.jar"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
37 <target name="jar"
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
38 description="Compile sources to ${jar.name}.">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
39 <kotlinc src="." output="${jar.name}"
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
40 noStdlib="false" includeRuntime="true">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
41 <compilerarg line="-jvm-target 1.8"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
42 <classpath>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
43 <fileset dir="${env.ANT_HOME}/lib">
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
44 <include name="*.jar"/>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
45 </fileset>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
46 </classpath>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
47 </kotlinc>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
48 </target>
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
49
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
50
e90d290a9a8d Remove dependence on Nashorn.
David Barts <n5jrn@me.com>
parents:
diff changeset
51 </project>