Build: Force Java 7 for mavencentral jars used by Android

This commit is contained in:
zzz
2020-05-28 14:06:37 +00:00
parent 3ad8f9b9a5
commit d8b308dd9d
2 changed files with 17 additions and 2 deletions

View File

@ -43,7 +43,7 @@ sloccount.report.file=sloccount.sc
require.gettext=true
# Compile for this version of Java
javac.version=1.8
#javac.version=1.8
# Additional classpath if required
#javac.classpath=/PATH/TO/pack200.jar

View File

@ -2341,8 +2341,21 @@
<echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
</target>
<target name="forceJava7">
<!-- must be set for Android -->
<fail message="javac.version is set to ${javac.version} - must be 1.7 for Android" >
<condition>
<and>
<isset property="javac.version" />
<not><equals arg1="${javac.version}" arg2="1.7"/></not>
</and>
</condition>
</fail>
<property name="javac.version" value="1.7" />
</target>
<!-- depends on buildCoreTest so that the router unit test javadocs can find the core unit test classes -->
<target name="mavenCentral.deps" depends="buildRouter, buildStreaming, buildCoreTest">
<target name="mavenCentral.deps" depends="forceJava7, buildRouter, buildStreaming, buildCoreTest">
<ant dir="core/java/">
<target name="javadocJar" />
<target name="sourcesJar" />
@ -2360,6 +2373,8 @@
<target name="sourcesJar" />
</ant>
<ant dir="apps/jetty/">
<!-- not used in Android -->
<property name="javac.version" value="1.8" />
<target name="servletJar" />
<target name="servletJavadocJar" />
<target name="servletSourcesJar" />