gradle-build-action/README.md

41 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2024-01-27 01:43:38 +08:00
> [!IMPORTANT]
> As of `v3` this action has been superceded by `gradle/actions/setup-gradle`.
> Any workflow that uses `gradle/gradle-build-action@v3` will transparently delegate to `gradle/actions/setup-gradle@v3`.
>
> Users are encouraged to update their workflows, replacing:
> ```
> uses: gradle/gradle-build-action@v3
> ```
>
> with
> ```
> uses: gradle/actions/setup-gradle@v3
> ```
>
> See the [setup-gradle documentation](https://github.com/gradle/actions/tree/main/setup-gradle) for up-to-date documentation for `gradle/actions/setup-gradle`.
2024-01-27 01:43:38 +08:00
2024-08-08 06:48:29 +08:00
# Setup Gradle for use in GitHub Actions workflows
2019-09-21 05:06:59 +08:00
2024-08-08 06:48:29 +08:00
This GitHub Action can be used to configure Gradle on any platform supported by GitHub Actions.
2019-09-21 05:06:59 +08:00
## Example usage
```yaml
name: Build
2024-01-02 04:48:08 +08:00
on: [ push ]
2023-08-21 06:27:48 +08:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
2023-08-21 06:27:48 +08:00
- name: Setup Gradle
2024-08-08 06:48:29 +08:00
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
2023-08-21 06:27:48 +08:00
run: ./gradlew build
```
See the [full setup-gradle documentation](https://github.com/gradle/actions/tree/main/setup-gradle) for more advanced usage scenarios.