diff options
author | Sven Gothel <[email protected]> | 2019-08-18 03:38:25 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-08-18 03:38:25 +0200 |
commit | 189f8ede61afea66ea14f7402dac10381a98c9ca (patch) | |
tree | 4ac64e1f9112d7ce9acf453192f41ea767e58f4a | |
parent | 0577701f4d92c414dbfe6875f4319fd311e0106c (diff) |
Bug 1363: Java 11: Fix javadoc invocation, drop -source <release> for compile time javac
Also prepare the 'target.releaselevel' property to be set by 'RELEASE_LEVEL' environment,
however - we do not use it at this point.
For now, we build gluegen-rt using '-source 1.8' '-target 1.8'
and the bootclasspath of openjdk8 rt.jar to ensure java8 compatibility.
Alternatively one could use '--release 8' instead using the java11
distributed modules. However, I think the above method is more safe,
only allowing java8 rt.jar to be used for compilation.
Further, gluegen.jar is build using '-target 1.8' only,
since it musty use java11 sources at least for the javadoc taglet.
-rw-r--r-- | make/build.xml | 12 | ||||
-rwxr-xr-x | make/jogamp-env.xml | 19 | ||||
-rwxr-xr-x | make/scripts/make.gluegen.all.linux-x86_64.sh | 4 |
3 files changed, 29 insertions, 6 deletions
diff --git a/make/build.xml b/make/build.xml index 2bd077e..ae91df5 100644 --- a/make/build.xml +++ b/make/build.xml @@ -33,6 +33,12 @@ <pathelement location="${antlr.jar}" /> <pathelement location="${semver.jar}" /> </path> + <path id="javadoc_gluegen.classpath"> + <pathelement location="${ant.jar}" /> + <pathelement location="${antlr.jar}" /> + <pathelement location="${semver.jar}" /> + <pathelement location="${gluegen.jar}" /> + </path> </target> <target name="init.android" if="android-jars.available" > @@ -780,6 +786,7 @@ <src path="${src.java}" /> <src path="${src.generated.java}" /> <classpath refid="cc_gluegen.classpath" /> + <!-- compilerarg line="release ${target.releaselevel}"/ --> </javac> <!-- move platform-specific native headers into the right directories --> @@ -799,7 +806,6 @@ excludes="${gluegen.excludes.all} ${gluegen-rt.classes} ${java.part.android}" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" - source="${target.sourcelevel}" target="${target.targetlevel}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <src path="${src.jcpp}" /> @@ -1283,9 +1289,11 @@ source="${target.sourcelevel}" maxmemory="${javac.memorymax}" stylesheetfile="doc/javadoc/stylesheet.css"> - <classpath path="${classes}"/> + <classpath refid="javadoc_gluegen.classpath" /> <link offline="true" href="${javadoc.link}" packagelistLoc="142-packages" /> <arg value="${javadoc.xarg1}"/> + <arg value="-html5"/> + <arg value="--show-packages=all"/> </javadoc> <copy todir="${javadoc.gluegen.path}/resources" overwrite="true"> <fileset dir="doc/javadoc/resources" includes="*" /> diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml index 5a2396c..6eb2e86 100755 --- a/make/jogamp-env.xml +++ b/make/jogamp-env.xml @@ -161,6 +161,12 @@ </not> </condition> + <condition property="target.releaselevel" value="${env.RELEASE_LEVEL}"> + <not> + <equals arg1="${env.RELEASE_LEVEL}" arg2="$${env.RELEASE_LEVEL}" casesensitive="true" /> + </not> + </condition> + <condition property="target.rt.jar" value="${env.TARGET_RT_JAR}"> <not> <equals arg1="${env.TARGET_RT_JAR}" arg2="$${env.TARGET_RT_JAR}" casesensitive="true" /> @@ -171,12 +177,14 @@ <and> <isset property="target.sourcelevel"/> <isset property="target.targetlevel"/> + <!-- isset property="target.releaselevel"/ --> <isset property="target.rt.jar"/> </and> </condition> <echo message="target.user.set ${target.user.set}"/> <echo message="target.sourcelevel ${target.sourcelevel}"/> <echo message="target.targetlevel ${target.targetlevel}"/> + <echo message="target.releaselevel ${target.releaselevel}"/> <echo message="target.rt.jar ${target.rt.jar}"/> <fail message="You need to specify all properties 'target.sourcelevel', 'target.targetlevel' and 'target.rt.jar'."> @@ -192,6 +200,7 @@ <not> <or> <contains string="${target.sourcelevel}" substring="1.8" casesensitive="false" /> + <contains string="${target.sourcelevel}" substring="8" casesensitive="false" /> </or> </not> </condition> @@ -201,10 +210,20 @@ <not> <or> <contains string="${target.targetlevel}" substring="1.8" casesensitive="false" /> + <contains string="${target.targetlevel}" substring="8" casesensitive="false" /> </or> </not> </condition> </fail> + <!-- fail message="Unsupported Target Java releaselevel: ${target.releaselevel}. Make sure that the releaselevel is set to 8."> + <condition> + <not> + <or> + <contains string="${target.releaselevel}" substring="8" casesensitive="false" /> + </or> + </not> + </condition> + </fail --> <property name="javacdebug" value="true" /> <property name="javacdebuglevel" value="source,lines" /> diff --git a/make/scripts/make.gluegen.all.linux-x86_64.sh b/make/scripts/make.gluegen.all.linux-x86_64.sh index 4d3ca6d..b0bbed7 100755 --- a/make/scripts/make.gluegen.all.linux-x86_64.sh +++ b/make/scripts/make.gluegen.all.linux-x86_64.sh @@ -13,10 +13,6 @@ fi # -DisLinuxAMD64=true \ # -DisX11=true \ # -# -Dtarget.sourcelevel=1.6 \ -# -Dtarget.targetlevel=1.6 \ -# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \ -# # -Dc.compiler.debug=true \ # -Djavacdebuglevel="source,lines,vars" \ |