Skip to content
Compare
Choose a tag to compare
@bigdaz bigdaz released this 31 Dec 03:44
· 871 commits to main since this release
3edb3cb

Overview

This release brings a major improvement in usability, allowing the action to be used to "setup Gradle" without requiring all Gradle invocations to be managed by the action.

jobs:
  build-my-app:
    steps:
    - uses: actions/checkout@v2
    - name: Setup Gradle
      uses: gradle/gradle-build-action@v2
    - name: Execute Gradle build
      run: ./gradlew build

Any Gradle invocation after the first gradle-build-action step will benefit from caching and build-scan capture just as if it was invoked through a subsequent gradle-build-action. This is achieved via init scripts added when initializing/restoring the Gradle User Home.

This change makes it easier to adopt the gradle-build-action into an existing GitHub Actions workflow and enables usages such as:

  • Redirect all Gradle log output to a file #72
  • Run a script to configure the environment prior to Gradle invocation #15
  • Capture Gradle output for use in a subsequent step #112

Usability improvements

  • Can use regular run step to invoke Gradle and still benefit from Gradle User Home caching as well as build-scan integration.

Caching improvements

  • Wrapper distributions and generated API jars are now cached individually, allowing for better reuse and more efficient storage: #78
  • Java distributions downloaded by Gradle are cached: #33

Changes in detail

  • Avoid using command-line modification to enhance build execution by @bigdaz in #123
  • Refactor: use a single .json file to describe all cached artifact bundles by @bigdaz in #121
  • Cache wrapper zips and generated jars individually by @bigdaz in #127
  • Restore/save configuration-cache data in first action step by @bigdaz in #128
  • Allow action to be used without Gradle execution by @bigdaz in #130
  • Cache downloaded Java Toolchains by @bigdaz in #131

Full Changelog: v2.0.0...v2.1.0