Changeset 34620 in osm


Ignore:
Timestamp:
2018-09-04T23:47:31+02:00 (6 years ago)
Author:
donvip
Message:

see #josm16498 - update build for Java 12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/build-common.xml

    r34605 r34620  
    1616    <property name="josm.test.build.dir"    location="../../core/test/build"/>
    1717    <property name="jmockit.jar"            location="../00_core_test_lib/jmockit-1.41.jar"/>
    18     <property name="error_prone_ant.jar"    location="../00_core_tools/error_prone_ant.jar"/>
     18    <property name="error_prone_core.jar"   location="../00_core_tools/error_prone_core.jar"/>
     19    <property name="error_prone_javac.jar"  location="../00_core_tools/error_prone_javac.jar"/>
    1920    <property name="checkstyle.jar"         location="../00_core_tools/checkstyle/checkstyle-all.jar"/>
    2021    <property name="checkstyle-build.dir"   location="../00_core_tools/checkstyle/build"/>
     22    <property name="jformatstring.jar"      location="../00_core_tools/spotbugs/jFormatString-3.0.0.jar"/>
    2123    <property name="spotbugs-ant.jar"       location="../00_core_tools/spotbugs/spotbugs-ant.jar"/>
    2224    <property name="annotations.jar"        location="../00_core_tools/spotbugs/spotbugs-annotations.jar"/>
     
    4244        <os family="Windows"/>
    4345    </condition>
    44     <!-- For Java9-specific stuff -->
    45     <condition property="isJava9">
    46         <matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" />
    47     </condition>
    48     <!-- For Java10-specific stuff -->
    49     <condition property="isJava10">
    50         <matches string="${ant.java.version}" pattern="1[0-9]" />
    51     </condition>
    52     <!-- For Java11-specific stuff -->
    53     <condition property="isJava11">
    54         <matches string="${ant.java.version}" pattern="1[1-9]" />
    55     </condition>
    56     <!-- Disable error_prone on Java 10+, see https://github.com/google/error-prone/issues/860 -->
    57     <condition property="javac.compiler" value="modern" else="com.google.errorprone.ErrorProneAntCompilerAdapter">
    58         <isset property="isJava10"/>
    59     </condition>
    60     <!-- Disable jacoco on Java 11+, see https://github.com/jacoco/jacoco/issues/629 -->
     46    <!-- For Java specific stuff by version -->
     47    <condition property="isJava9"><matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" /></condition>
     48    <condition property="isJava10"><matches string="${ant.java.version}" pattern="1[0-9]" /></condition>
     49    <condition property="isJava11"><matches string="${ant.java.version}" pattern="1[1-9]" /></condition>
     50    <condition property="isJava12"><matches string="${ant.java.version}" pattern="1[2-9]" /></condition>
     51    <condition property="isJava13"><matches string="${ant.java.version}" pattern="1[3-9]" /></condition>
     52    <!-- Disable jacoco on Java 13+, see https://github.com/jacoco/jacoco/pull/738 -->
    6153    <condition property="coverageByDefault">
    6254        <not>
    63             <isset property="isJava11"/>
     55            <isset property="isJava13"/>
    6456        </not>
    6557    </condition>
     
    8678        <fileset refid="jaxb.jars"/>
    8779    </path>
     80    <path id="processor.path">
     81        <pathelement location="${error_prone_core.jar}"/>
     82        <pathelement location="${jformatstring.jar}"/>
     83    </path>
    8884
    8985    <!--
     
    105101    <target name="compile" depends="init, pre-compile" unless="skip-compile">
    106102        <echo message="compiling sources for ${plugin.jar} ..."/>
    107         <javac compiler="${javac.compiler}" srcdir="${plugin.src.dir}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"
    108             encoding="UTF-8" target="${java.lang.version}" source="${java.lang.version}">
    109             <compilerclasspath>
    110                 <pathelement location="${error_prone_ant.jar}"/>
    111             </compilerclasspath>
     103        <javac srcdir="${plugin.src.dir}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"
     104            encoding="UTF-8" target="${java.lang.version}" source="${java.lang.version}" fork="yes">
     105            <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/>
     106            <compilerarg line="-XDcompilePolicy=simple"/>
     107            <compilerarg value="-processorpath"/>
     108            <compilerarg pathref="processor.path"/>
    112109            <compilerarg value="-Xlint:deprecation"/>
    113110            <compilerarg value="-Xlint:unchecked"/>
    114             <compilerarg value="-Xep:StringSplitter:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    115             <compilerarg value="-Xep:ReferenceEquality:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    116             <compilerarg value="-Xep:InsecureCryptoUsage:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    117             <compilerarg value="-Xep:FutureReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    118             <compilerarg value="-Xep:JdkObsolete:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
     111            <compilerarg value="-Xplugin:ErrorProne -Xep:StringSplitter:OFF -Xep:ReferenceEquality:OFF -Xep:InsecureCryptoUsage:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:JdkObsolete:OFF"/>
    119112            <compilerarg line="-Xmaxwarns 1000"/>
    120113            <classpath refid="plugin.classpath"/>
Note: See TracChangeset for help on using the changeset viewer.