name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '11', '17', '18' ]
        # Kotlin needs access to java.util
        include:
          - java: '11'
            maven-opts: ''
            maven-params: -pl '!spring/test/shedlock-springboot-future-test'
          - java: '17'
            maven-opts: --add-opens java.base/java.util=ALL-UNNAMED
            maven-params: ''
          - java: '18'
            maven-opts: --add-opens java.base/java.util=ALL-UNNAMED
            maven-params: ''
    steps:
      - uses: actions/checkout@v3
      - name: Set up JDK ${{ matrix.java }}
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java }}
          distribution: 'zulu'
          cache: 'maven'
      - name: Build with Maven
        env:
          MAVEN_OPTS: ${{ matrix.maven-opts }}
        run: mvn ${{ matrix.maven-params }} test javadoc:javadoc

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '11', '17']
        # Kotlin needs access to java.util
        include:
          - java: '11'
            maven-opts: ''
            maven-params: -pl '!spring/test/shedlock-springboot-future-test'
          - java: '17'
            maven-opts: --add-opens java.base/java.util=ALL-UNNAMED
            maven-params: ''
    steps:
      - uses: actions/checkout@v3
      - name: Set up JDK ${{ matrix.java }}
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java }}
          distribution: 'zulu'
          cache: 'maven'
      - name: Build with Maven
        env:
          MAVEN_OPTS: ${{ matrix.maven-opts }}
        run: mvn ${{ matrix.maven-params }} test javadoc:javadoc

Drop Java 18 from test matrix
Drop Java 18 from test matrix