Changeset 34363 in osm for applications


Ignore:
Timestamp:
2018-06-29T21:30:37+02:00 (6 years ago)
Author:
donvip
Message:

see #josm15560, see #josm16047 - Add compatibility with Java 10/11

File:
1 edited

Legend:

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

    r34362 r34363  
    1111**
    1212-->
    13 <project name="plugin_common" basedir="." xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if">
     13<project name="plugin_common" basedir="." xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
    1414
    1515    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     
    4040    <!-- For Java9-specific stuff -->
    4141    <condition property="isJava9">
    42         <matches string="${ant.java.version}" pattern="(1.)?9" />
     42        <matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" />
     43    </condition>
     44    <!-- For Java10-specific stuff -->
     45    <condition property="isJava10">
     46        <matches string="${ant.java.version}" pattern="1[0-9]" />
     47    </condition>
     48    <!-- For Java11-specific stuff -->
     49    <condition property="isJava11">
     50        <matches string="${ant.java.version}" pattern="1[1-9]" />
     51    </condition>
     52    <!-- Disable error_prone on Java 10+, see https://github.com/google/error-prone/issues/860 -->
     53    <condition property="javac.compiler" value="modern" else="com.google.errorprone.ErrorProneAntCompilerAdapter">
     54        <isset property="isJava10"/>
     55    </condition>
     56    <!-- Disable jacoco on Java 11+, see https://github.com/jacoco/jacoco/issues/629 -->
     57    <condition property="coverageByDefault">
     58        <not>
     59            <isset property="isJava11"/>
     60        </not>
    4361    </condition>
    4462    <target name="-jaxb_before9" unless="isJava9">
     
    231249            <bottom><![CDATA[<a href="https://josm.openstreetmap.de/wiki/Plugins">JOSM Plugins</a>]]></bottom>
    232250            <arg value="-html5" if:set="isJava9" />
    233             <arg value="--add-exports" if:set="isJava9" />
    234             <arg value="javafx.graphics/com.sun.javafx.application=ALL-UNNAMED" if:set="isJava9" />
     251            <arg value="--add-exports" if:set="isJava9" unless:set="noJavaFX" />
     252            <arg value="javafx.graphics/com.sun.javafx.application=ALL-UNNAMED" if:set="isJava9" unless:set="noJavaFX" />
    235253        </javadoc>
    236254    </target>
     
    518536        <sequential>
    519537            <echo message="Running unit tests with JUnit"/>
    520             <jacoco:coverage destfile="${plugin.test.dir}/jacoco.exec">
     538            <jacoco:coverage destfile="${plugin.test.dir}/jacoco.exec" enabled="${coverageByDefault}">
    521539                <junit printsummary="yes" fork="true" forkmode="once" dir="${basedir}">
    522540                    <jvmarg value="-Dfile.encoding=UTF-8"/>
Note: See TracChangeset for help on using the changeset viewer.