name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java_version: [ 8, 11, 14 ]

    steps:
    - uses: actions/checkout@v2

    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java_version }}

    - name: Get Maven version
      run: mvn --version |head -1 > mvn-version

    - name: Cache Maven dependencies (for J2Cl tests)
      id: cache-maven-dependencies
      uses: actions/cache@v2
      with:
        path: ~/.m2/repository/
        key: mvn-deps=${{ hashFiles('mvn-version') }}-${{ hashFiles('pom-j2cl-test.xml') }}

    - name: Build with Gradle
      uses: eskatos/gradle-command-action@v1
      with:
        arguments: build -Pj2clTest.webdriver=chrome
        wrapper-cache-enabled: true
        dependencies-cache-enabled: true
        dependencies-cache-key: '**/*gradle.lockfile'
        dependencies-cache-exact: true

    - name: Before Maven cache
      if: steps.cache-maven-dependencies.outputs.cache-hit != 'true'
      run: shopt -s globstar && rm -rf ~/.m2/repository/**/*-SNAPSHOT/ ~/.m2/repository/org/gwtproject/**/LOCAL/

name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java_version: [ 8, 11, 15 ]

    steps:
    - uses: actions/checkout@v2

    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java_version }}

    - name: Get Maven version
      run: mvn --version |head -1 > mvn-version

    - name: Cache Maven dependencies (for J2Cl tests)
      id: cache-maven-dependencies
      uses: actions/cache@v2
      with:
        path: ~/.m2/repository/
        key: mvn-deps=${{ hashFiles('mvn-version') }}-${{ hashFiles('pom-j2cl-test.xml') }}

    - name: Build with Gradle
      uses: eskatos/gradle-command-action@v1
      with:
        arguments: build -Pj2clTest.webdriver=chrome
        wrapper-cache-enabled: true
        dependencies-cache-enabled: true
        dependencies-cache-key: '**/*gradle.lockfile'
        dependencies-cache-exact: true

    - name: Before Maven cache
      if: steps.cache-maven-dependencies.outputs.cache-hit != 'true'
      run: shopt -s globstar && rm -rf ~/.m2/repository/**/*-SNAPSHOT/ ~/.m2/repository/org/gwtproject/**/LOCAL/

Use JDK 15 in CI, instead of 14
Use JDK 15 in CI, instead of 14
