Browse Source

Redo build.xml by hand

main
Tony Garnock-Jones 10 months ago
parent
commit
c589af0ffd
  1. 1
      .gitignore
  2. 3
      build.properties
  3. 339
      build.xml

1
.gitignore

@ -1 +1,2 @@
out/
doc/

3
build.properties

@ -1,3 +0,0 @@
path.variable.kotlin_bundled=/opt/idea-IC-203.5981.155/plugins/Kotlin/kotlinc
path.variable.maven_repository=/home/tonyg/.m2/repository
jdk.home.11=/usr/lib/jvm/java-11-openjdk-amd64

339
build.xml

@ -1,317 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="syndicate-java" default="all">
<property file="build.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/*.rbc/**"/>
<exclude name="**/*.yarb/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/CVS/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.egg"/>
<include name="*.zip"/>
<include name="*.war"/>
<include name="*.swc"/>
<include name="*.ear"/>
<include name="*.jar"/>
<include name="*.klib"/>
<include name="*.ane"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
<exclude name="**/?*.aj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.11" value="${jdk.home.11}/bin"/>
<path id="jdk.classpath.11">
<fileset dir="${jdk.home.11}">
<include name="../java-1.11.0-openjdk-amd64!/java.base"/>
<include name="../java-1.11.0-openjdk-amd64!/java.compiler"/>
<include name="../java-1.11.0-openjdk-amd64!/java.datatransfer"/>
<include name="../java-1.11.0-openjdk-amd64!/java.desktop"/>
<include name="../java-1.11.0-openjdk-amd64!/java.instrument"/>
<include name="../java-1.11.0-openjdk-amd64!/java.logging"/>
<include name="../java-1.11.0-openjdk-amd64!/java.management"/>
<include name="../java-1.11.0-openjdk-amd64!/java.management.rmi"/>
<include name="../java-1.11.0-openjdk-amd64!/java.naming"/>
<include name="../java-1.11.0-openjdk-amd64!/java.net.http"/>
<include name="../java-1.11.0-openjdk-amd64!/java.prefs"/>
<include name="../java-1.11.0-openjdk-amd64!/java.rmi"/>
<include name="../java-1.11.0-openjdk-amd64!/java.scripting"/>
<include name="../java-1.11.0-openjdk-amd64!/java.se"/>
<include name="../java-1.11.0-openjdk-amd64!/java.security.jgss"/>
<include name="../java-1.11.0-openjdk-amd64!/java.security.sasl"/>
<include name="../java-1.11.0-openjdk-amd64!/java.smartcardio"/>
<include name="../java-1.11.0-openjdk-amd64!/java.sql"/>
<include name="../java-1.11.0-openjdk-amd64!/java.sql.rowset"/>
<include name="../java-1.11.0-openjdk-amd64!/java.transaction.xa"/>
<include name="../java-1.11.0-openjdk-amd64!/java.xml"/>
<include name="../java-1.11.0-openjdk-amd64!/java.xml.crypto"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.accessibility"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.aot"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.attach"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.charsets"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.compiler"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.crypto.cryptoki"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.crypto.ec"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.dynalink"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.editpad"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.hotspot.agent"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.httpserver"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.ed"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.jvmstat"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.le"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.opt"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.vm.ci"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.vm.compiler"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.internal.vm.compiler.management"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jartool"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.javadoc"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jcmd"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jconsole"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jdeps"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jdi"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jdwp.agent"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jfr"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jlink"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jshell"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jsobject"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.jstatd"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.localedata"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.management"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.management.agent"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.management.jfr"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.naming.dns"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.naming.ldap"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.naming.rmi"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.net"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.pack"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.rmic"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.scripting.nashorn"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.scripting.nashorn.shell"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.sctp"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.security.auth"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.security.jgss"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.unsupported"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.unsupported.desktop"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.xml.dom"/>
<include name="../java-1.11.0-openjdk-amd64!/jdk.zipfs"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.11}"/>
<property name="project.jdk.bin" value="${jdk.bin.11}"/>
<property name="project.jdk.classpath" value="jdk.classpath.11"/>
<!-- Global Libraries -->
<!-- Modules -->
<!-- Module main -->
<dirname property="module.main.basedir" file="${ant.file}"/>
<property name="module.jdk.home.main" value="${project.jdk.home}"/>
<property name="module.jdk.bin.main" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.main" value="${project.jdk.classpath}"/>
<property name="compiler.args.main" value="-encoding UTF-8 -source 11 -target 11 ${compiler.args}"/>
<property name="main.output.dir" value="${module.main.basedir}/out/production/main"/>
<property name="main.testoutput.dir" value="${module.main.basedir}/out/test/main"/>
<path id="main.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="main.module.production.classpath">
<path refid="${module.jdk.classpath.main}"/>
</path>
<path id="main.runtime.production.module.classpath">
<pathelement location="${main.output.dir}"/>
</path>
<path id="main.module.classpath">
<path refid="${module.jdk.classpath.main}"/>
<pathelement location="${main.output.dir}"/>
</path>
<path id="main.runtime.module.classpath">
<pathelement location="${main.testoutput.dir}"/>
<pathelement location="${main.output.dir}"/>
</path>
<patternset id="excluded.from.module.main">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.main">
<patternset refid="excluded.from.module.main"/>
</patternset>
<path id="main.module.sourcepath">
<dirset dir="${module.main.basedir}/src/main">
<include name="java"/>
</dirset>
</path>
<target name="compile.module.main" depends="compile.module.main.production,compile.module.main.tests" description="Compile module main"/>
<target name="compile.module.main.production" description="Compile module main; production classes">
<mkdir dir="${main.output.dir}"/>
<javac destdir="${main.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.main}/javac">
<compilerarg line="${compiler.args.main}"/>
<bootclasspath refid="main.module.bootclasspath"/>
<classpath refid="main.module.production.classpath"/>
<src refid="main.module.sourcepath"/>
<patternset refid="excluded.from.compilation.main"/>
</javac>
<copy todir="${main.output.dir}">
<fileset dir="${module.main.basedir}/src/main/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.main.tests" depends="compile.module.main.production" description="compile module main; test classes" unless="skip.tests"/>
<target name="clean.module.main" description="cleanup module">
<delete dir="${main.output.dir}"/>
<delete dir="${main.testoutput.dir}"/>
<target name="all" depends="build,jar,javadoc">
</target>
<!-- Module test -->
<dirname property="module.test.basedir" file="${ant.file}"/>
<property name="module.jdk.home.test" value="${project.jdk.home}"/>
<property name="module.jdk.bin.test" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.test" value="${project.jdk.classpath}"/>
<property name="compiler.args.test" value="-encoding UTF-8 -source 11 -target 11 ${compiler.args}"/>
<property name="test.output.dir" value="${module.test.basedir}/out/production/test"/>
<property name="test.testoutput.dir" value="${module.test.basedir}/out/test/test"/>
<path id="test.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="test.module.production.classpath">
<path refid="${module.jdk.classpath.test}"/>
<pathelement location="${main.output.dir}"/>
</path>
<path id="test.runtime.production.module.classpath">
<pathelement location="${test.output.dir}"/>
<path refid="main.runtime.production.module.classpath"/>
</path>
<path id="test.module.classpath">
<path refid="${module.jdk.classpath.test}"/>
<pathelement location="${test.output.dir}"/>
<pathelement location="${main.testoutput.dir}"/>
<pathelement location="${main.output.dir}"/>
</path>
<path id="test.runtime.module.classpath">
<pathelement location="${test.testoutput.dir}"/>
<pathelement location="${test.output.dir}"/>
<path refid="main.runtime.module.classpath"/>
</path>
<patternset id="excluded.from.module.test">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.test">
<patternset refid="excluded.from.module.test"/>
</patternset>
<path id="test.module.test.sourcepath">
<dirset dir="${module.test.basedir}/src/test">
<include name="java"/>
</dirset>
</path>
<target name="compile.module.test" depends="compile.module.test.production,compile.module.test.tests" description="Compile module test"/>
<target name="compile.module.test.production" depends="compile.module.main" description="Compile module test; production classes"/>
<target name="compile.module.test.tests" depends="compile.module.test.production" description="compile module test; test classes" unless="skip.tests">
<mkdir dir="${test.testoutput.dir}"/>
<javac destdir="${test.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.test}/javac">
<compilerarg line="${compiler.args.test}"/>
<bootclasspath refid="test.module.bootclasspath"/>
<classpath refid="test.module.classpath"/>
<src refid="test.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.test"/>
<path id="main.classpath">
<pathelement path="out/production/main"/>
</path>
<target name="build">
<mkdir dir="out/production/main"/>
<javac destdir="out/production/main" debug="true">
<src path="src/main/java"/>
</javac>
<copy todir="${test.testoutput.dir}">
<fileset dir="${module.test.basedir}/src/test/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
<mkdir dir="out/test/test"/>
<javac destdir="out/test/test" classpathref="main.classpath" debug="true">
<src path="src/test/java"/>
</javac>
</target>
<target name="jar" depends="build">
<mkdir dir="out/lib"/>
<jar destfile="out/lib/org.syndicate_lang.actors.jar" basedir="out/production/main" />
</target>
<target name="clean.module.test" description="cleanup module">
<delete dir="${test.output.dir}"/>
<delete dir="${test.testoutput.dir}"/>
<target name="javadoc">
<javadoc destdir="doc" access="public">
<sourcepath path="src/main/java"/>
</javadoc>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
<target name="clean">
<delete dir="out"/>
<delete dir="doc"/>
</target>
<target name="clean" depends="clean.module.main, clean.module.test" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.main, compile.module.test" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>
</project>
Loading…
Cancel
Save