Ticket #23114: 23114.patch

File 23114.patch, 4.0 KB (added by taylor.smock, 3 years ago)
  • new file src/module-info.java

    Subject: [PATCH] 23114
    ---
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/module-info.java b/src/module-info.java
    new file mode 100644
    - +  
     1// License: GPL. For details, see Readme.txt file.
     2module org.openstreetmap.gui.jmapviewer {
     3    requires java.desktop;
     4    requires java.logging;
     5    exports org.openstreetmap.gui.jmapviewer;
     6    exports org.openstreetmap.gui.jmapviewer.checkBoxTree;
     7    exports org.openstreetmap.gui.jmapviewer.events;
     8    exports org.openstreetmap.gui.jmapviewer.interfaces;
     9    exports org.openstreetmap.gui.jmapviewer.tilesources;
     10}
  • build.xml

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/build.xml b/build.xml
    a b  
    11<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    22<project default="all" name="jmapviewer" xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
    33
    4     <property name="java.lang.version" value="1.8" />
     4    <property name="java.lang.version" value="8" />
    55    <dirname property="base.dir" file="${ant.file.jmapviewer}"/>
    66    <property name="tools.dir" location="${base.dir}/tools"/>
    77    <property name="jacoco.includes" value="org.openstreetmap.gui.jmapviewer.*" />
     
    5757    </target>
    5858
    5959    <target name="build" depends="clean">
    60         <javac srcdir="src" destdir="bin" source="${java.lang.version}" target="${java.lang.version}" debug="true" includeantruntime="false" encoding="UTF-8">
     60        <!-- compile module info - we need to compile everything to ensure that all requires are there -->
     61        <javac srcdir="src" destdir="bin" release="9" debug="true" includeantruntime="false" encoding="UTF-8" if:set="isJava9">
     62            <include name="module-info.java" />
     63            <include name="org/openstreetmap/gui/jmapviewer/**" />
     64        </javac>
     65
     66        <!-- Remove the files compiled with Java 9 so that the next compile stage will compile to the appropriate version -->
     67        <delete>
     68            <fileset dir="bin">
     69                <include name="org/openstreetmap/gui/jmapviewer/**" />
     70            </fileset>
     71        </delete>
     72
     73        <javac srcdir="src" destdir="bin" release="${java.lang.version}" debug="true" includeantruntime="false" encoding="UTF-8">
    6174            <include name="org/openstreetmap/gui/jmapviewer/**" />
    6275        </javac>
    6376
     
    7992    <target name="pack" depends="build">
    8093        <!-- Create the JAR file containing the compiled class files -->
    8194        <jar destfile="JMapViewer.jar" filesetmanifest="mergewithoutmain">
    82             <fileset dir="bin" includes="**/jmapviewer/**" />
     95            <fileset dir="bin" includes="module-info.class,**/jmapviewer/**" />
    8396        </jar>
    8497        <!-- Create the JAR file containing the source java files -->
    8598        <jar destfile="JMapViewer_src.jar" filesetmanifest="mergewithoutmain">
    86             <fileset dir="src" includes="**/jmapviewer/**" />
     99            <fileset dir="src" includes="module-info.java,**/jmapviewer/**" />
    87100        </jar>
    88101    </target>
    89102   
     
    122135        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
    123136            classpath="tools/checkstyle/checkstyle-all.jar"/>
    124137        <checkstyle config="tools/checkstyle/jmapviewer_checks.xml">
    125             <fileset dir="${basedir}/src" includes="**/*.java" />
     138            <!-- Exclude the module-info since checkstyle currently cannot parse it -->
     139            <fileset dir="${basedir}/src" includes="**/*.java" excludes="module-info.java" />
    126140            <formatter type="xml" toFile="checkstyle-jmapviewer.xml"/>
    127141        </checkstyle>
    128142    </target>