Unverified Commit f4e053dd authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Upgrade to reference `actions/setup-java@v2`

- Update all references in README.md
- Update version used in `pr-build-scan-comment`
- Discourage the use of `cache: gradle` with `setup-java@v2`
parent a7c463b4
Loading
Loading
Loading
Loading
+1 −1
Changes for .github/workflows/pr-build-scan-comment.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ jobs:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
    - uses: actions/setup-java@v2
      with:
        java-version: 11
    - uses: ./
+7 −5
Changes for README.md: 7 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ jobs:
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
    - uses: actions/setup-java@v2
      with:
        java-version: 11
        
@@ -33,7 +33,7 @@ jobs:

## Why use the `gradle-build-action`?

It is possible to directly invoke Gradle in your workflow, and the `setup-java` action provides a simple way to cache Gradle dependencies. 
It is possible to directly invoke Gradle in your workflow, and the `actions/setup-java@v2` action provides a simple way to cache Gradle dependencies. 

However, the `gradle-build-action` offers a number of advantages over this approach:

@@ -45,6 +45,8 @@ However, the `gradle-build-action` offers a number of advantages over this appro
The `gradle-build-action` is designed to provide these benefits with minimal configuration. 
These features work both when Gradle is executed via the `gradle-build-action` and for any Gradle execution in subsequent steps.

When using `gradle-build-action` we recommend that you _not_ use `actions/cache` or `actions/setup-java@v2` to explicitly cache the Gradle User Home. Doing so may interfere with the caching provided by this action.

## Use a specific Gradle version

The `gradle-build-action` can download and install a specified Gradle version, adding this installed version to the PATH.
@@ -80,7 +82,7 @@ jobs:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
    - uses: actions/setup-java@v2
      with:
        java-version: 11
    - uses: gradle/gradle-build-action@v2
@@ -106,7 +108,7 @@ jobs:
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
    - uses: actions/setup-java@v2
      with:
        java-version: 11
    
@@ -302,7 +304,7 @@ jobs:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
    - uses: actions/setup-java@v2
      with:
        java-version: 11
    - uses: gradle/gradle-build-action@v2