mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-02-05 14:30:02 +00:00
Fix ant warning about includeantruntime
According to https://stackoverflow.com/questions/5103384, ant 1.8 introduced a "misfeature" of providing the ant runtime by default in the java classpath. This causes some problems with reproducible builds, which is why later versions have a warning not to do it. The solution is to make the inclusion of ant.jar in the classpath explicit. That's been done now.
This commit is contained in:
parent
80b39372cb
commit
564c6cef7b
@ -5,6 +5,9 @@
|
||||
# ACBuild.properties. That will allow you to change locations of
|
||||
# support files for local builds.
|
||||
#
|
||||
antJarPathWin=C:/Java/lib/ant1.10.1/ant.jar
|
||||
antJarPathMac=/opt/local/share/java/apache-ant/lib/ant.jar
|
||||
antJarPathUnix=/usr/share/java/ant.jar
|
||||
swtJarPathWin=C:/Program Files/Eclipse 2.1.x/plugins/org.eclipse.swt.win32_2.1.3/ws/win32/swt.jar
|
||||
swtJarPathMac=/Users/Shared/eclipse/plugins/org.eclipse.swt.carbon.macosx_3.3.3.v3349.jar
|
||||
swtJarPathUnix=/usr/share/java/swt.jar
|
||||
|
@ -2,7 +2,12 @@
|
||||
<description>
|
||||
This script builds the distribution components.
|
||||
</description>
|
||||
|
||||
|
||||
<!-- Fix ant warning (explained: https://stackoverflow.com/questions/5103384) -->
|
||||
<presetdef name="javac">
|
||||
<javac includeantruntime="false" />
|
||||
</presetdef>
|
||||
|
||||
<property name="work" value="work"/>
|
||||
<property name="classes" value="${work}/classes"/>
|
||||
<property name="dist" value="${work}/dist"/>
|
||||
@ -15,6 +20,8 @@
|
||||
<property name="builddir" value="${basedir}/build" />
|
||||
<property file="${builddir}/ACBuild.properties"/>
|
||||
<property file="${builddir}/ACBuild-default.properties"/>
|
||||
|
||||
<!-- If you want to add a platform, create a conditional property for it here -->
|
||||
<condition property="isWin" value="true">
|
||||
<os family="windows" />
|
||||
</condition>
|
||||
@ -25,6 +32,7 @@
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="isUnix" value="true">
|
||||
<!-- macOS also provides unix, so we must explicitly exclude it here -->
|
||||
<and>
|
||||
<os family="unix" />
|
||||
<not>
|
||||
@ -32,6 +40,7 @@
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="signing-needed">
|
||||
<available file="${keyconf}" property="keyconf-exists" />
|
||||
</condition>
|
||||
@ -53,16 +62,19 @@
|
||||
</target>
|
||||
|
||||
<target name="init-win" if="isWin">
|
||||
<property name="antjar" value="${antJarPathWin}" />
|
||||
<property name="swtjar" value="${swtJarPathWin}" />
|
||||
<property name="juintjar" value="${junitPathWin}" />
|
||||
</target>
|
||||
|
||||
<target name="init-mac" if="isMac">
|
||||
<property name="antjar" value="${antJarPathMac}" />
|
||||
<property name="swtjar" value="${swtJarPathMac}" />
|
||||
<property name="juintjar" value="${junitPathMac}" />
|
||||
</target>
|
||||
|
||||
<target name="init-unix" if="isUnix">
|
||||
<property name="antjar" value="${antJarPathUnix}" />
|
||||
<property name="swtjar" value="${swtJarPathUnix}" />
|
||||
<property name="juintjar" value="${junitPathUnix}" />
|
||||
</target>
|
||||
@ -107,7 +119,7 @@
|
||||
</target>
|
||||
|
||||
<target name="executableGuiJar" depends="init" description="Build GUI executable JAR">
|
||||
<javac srcdir="${source}" destdir="${classes}" classpath="${swtjar}">
|
||||
<javac srcdir="${source}" destdir="${classes}" classpath="${antjar}:${swtjar}">
|
||||
<include name="**/*.java"/>
|
||||
<exclude name="**/*Test.java"/>
|
||||
</javac>
|
||||
@ -127,7 +139,7 @@
|
||||
</target>
|
||||
|
||||
<target name="executableCmdJar" depends="init" description="Build command-line only executable JAR">
|
||||
<javac srcdir="${source}" destdir="${classes}" >
|
||||
<javac srcdir="${source}" destdir="${classes}" classpath="${antjar}">
|
||||
<include name="**/*.java"/>
|
||||
<exclude name="**/*Test.java"/>
|
||||
<compilerarg value="-XDignore.symbol.file"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user