Compile and run with java 11, but require java 17 to run gradle #3431
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: analysis | |
permissions: read-all | |
on: [ push, pull_request ] | |
env: | |
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
ALLOWED_ENDPOINTS: > | |
api.adoptium.net:443 | |
api.github.com:443 | |
caffeine.gradle-enterprise.cloud:443 | |
downloads.gradle.org:443 | |
downloads.gradle-dn.com:443 | |
github.com:443 | |
jcenter.bintray.com:443 | |
objects.githubusercontent.com:443 | |
plugins.gradle.org:443 | |
plugins-artifacts.gradle.org:443 | |
repo.maven.apache.org:443 | |
repo1.maven.org:443 | |
services.gradle.org:443 | |
jobs: | |
forbiddenApis: | |
runs-on: ubuntu-latest | |
env: | |
JAVA_VERSION: 21 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }} | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Forbidden Apis | |
uses: ./.github/actions/run-gradle | |
with: | |
java: ${{ env.JAVA_VERSION }} | |
arguments: forbiddenApis -DforbiddenApis | |
pmd: | |
runs-on: ubuntu-latest | |
env: | |
JAVA_VERSION: 21 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }} | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Pmd | |
uses: ./.github/actions/run-gradle | |
with: | |
java: ${{ env.JAVA_VERSION }} | |
arguments: pmdJavaPoet pmdMain pmdCodeGen pmdJmh -Dpmd | |
spotbugs: | |
runs-on: ubuntu-latest | |
env: | |
JAVA_VERSION: 21 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }} | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Spotbugs | |
uses: ./.github/actions/run-gradle | |
with: | |
java: ${{ env.JAVA_VERSION }} | |
arguments: spotbugsJavaPoet spotbugsMain spotbugsCodeGen spotbugsJmh -Dspotbugs |