name: Main build
description: Sets up JDKs and runs Gradle
inputs:
  arguments:
    required: true
    description: Gradle arguments
    default: build
runs:
  using: "composite"
  steps:
    - uses: ./.github/actions/setup-test-jdk
    - uses: ./.github/actions/run-gradle
      with:
        arguments: ${{ inputs.arguments }}
    - uses: actions/upload-artifact@v3
      if: ${{ always() }}
      with:
        name: Test Distribution trace files (${{ github.job }})
        path: '**/build/test-results/*/trace.json'
