name: Java CI

on:
  push:
    branches:
      - main
  pull_request:

concurrency: 
  group:  ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [8, 11, 17]

    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: ${{ matrix.java }}
      - uses: gradle/wrapper-validation-action@v1
      - uses: gradle/gradle-build-action@v2
      - run: ./gradlew -Dorg.gradle.jvmargs=-Xmx2g assemble
      - run: ./gradlew check

name: Java CI

on:
  push:
    branches:
      - main
  pull_request:

concurrency: 
  group:  ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [8, 11, 17, 18]

    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: ${{ matrix.java }}
      - uses: gradle/wrapper-validation-action@v1
      - uses: gradle/gradle-build-action@v2
      - run: ./gradlew -Dorg.gradle.jvmargs=-Xmx2g assemble
      - run: ./gradlew check

Add Java 18 to CI
Add Java 18 to CI

Prevent warnings in newer Java versions from being introduced to the
codebase.

Related to zaproxy/zaproxy#7389.

Signed-off-by: thc202 <43af82ef30812a20fbcf38b99a6f72cdd3a89ac1@gmail.com>
