Changeset 14316 in josm


Ignore:
Timestamp:
2018-10-13T01:37:04+02:00 (9 months ago)
Author:
Don-vip
Message:

rework Travis config:

  • add Windows build (Oracle JDK 11 only as Java is not fully supported yet)
  • drop openjdk10 (not LTS)
  • use openjdk11 on Linux instead of oraclejdk11
  • add macOS xcode10 (ships with jdk10)
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r14312 r14316  
    22script:
    33  - ant -version
    4   - (eval "$ANT_INVOCATION $(test ${TRAVIS_JDK_VERSION:0:4} = open && echo -DnoJavaFX=true) test-unit-hardfail")
     4  - $ANT_INVOCATION -DnoJavaFX=true test-unit-hardfail
    55  - "grep -L ', Failures: 0, Errors: 0, ' test/report/*.txt | xargs cat"
    6 os: linux
    7 dist: trusty
    86env:
    97  - ANT_INVOCATION="xvfb-run ant -Dtest.headless=false"
    108  - ANT_INVOCATION="ant -Dtest.headless=true"
    119jdk:
    12   - oraclejdk11
    13   - oraclejdk10
    1410  - openjdk8
     11  - openjdk11
    1512matrix:
    1613  include:
     14  - os: linux
     15    dist: trusty
    1716  - os: osx
    18     osx_image: xcode9.2
     17    osx_image: xcode9.3
    1918    jdk: ~
     19    env: ANT_INVOCATION="ant -Dtest.headless=true"
     20  - os: osx
     21    osx_image: xcode10
     22    jdk: ~
     23    env: ANT_INVOCATION="ant -Dtest.headless=true"
     24  - os: windows
     25    language: shell
     26    jdk: oraclejdk11
    2027    env: ANT_INVOCATION="ant -Dtest.headless=true"
    2128before_install:
     
    2330  - tar -xzvf apache-ant-1.10.5-bin.tar.gz
    2431  - export PATH=`pwd`/apache-ant-1.10.5/bin:$PATH
     32  - if [ "$TRAVIS_OS_NAME" == "windows" ] ; then choco install jdk11 && export JAVA_HOME="/c/Program Files/Java/jdk-11" ; fi
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r14272 r14316  
    66
    77import java.awt.Desktop;
     8import java.awt.GraphicsEnvironment;
    89import java.awt.Image;
    910import java.awt.Window;
     
    7475                quitHandler, aboutHandler, openFilesHandler, preferencesHandler}, this);
    7576            Object appli = eawtApplication.getConstructor((Class[]) null).newInstance((Object[]) null);
    76             if (Utils.getJavaVersion() >= 9) {
    77                 setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop());
    78             } else {
     77            if (Utils.getJavaVersion() < 9) {
    7978                setHandlers(eawtApplication, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, appli);
    8079                // this method has been deprecated, but without replacement. To remove with Java 9 migration
    8180                eawtApplication.getDeclaredMethod("setEnabledPreferencesMenu", boolean.class).invoke(appli, Boolean.TRUE);
     81            } else if (!GraphicsEnvironment.isHeadless()) {
     82                setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop());
    8283            }
    8384            // setup the dock icon. It is automatically set with application bundle and Web start but we need
Note: See TracChangeset for help on using the changeset viewer.