Skip to content

Commit

Permalink
Switch to new setup-gradle github action (#654)
Browse files Browse the repository at this point in the history
* Add CodeQL job

* Change dir

* Only run for plugin-build

* Bump actions and use macos runner

* Update to gradle-build action v4

* pinv3 -> pinv4

* do not use gradlew for matrix job

* Specify manual build mode for codeql

* codeql config

* source root change

* wip

* remove build

* wip

* Cleanup

* Changelog
  • Loading branch information
romtsn authored Feb 27, 2025
1 parent ca6e519 commit 0a3aa18
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Gradle
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
uses: gradle/actions/setup-gradle@aa23778d2dc6f6556fcc7164e99babbd8c3134e4 # pin@v4

- name: Set up Java
uses: actions/setup-java@v3
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/gradle-wrapper-validation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-sentry-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python-version: '3.10.5'

- name: Setup Gradle
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
uses: gradle/actions/setup-gradle@aa23778d2dc6f6556fcc7164e99babbd8c3134e4 # pin@v4

- name: Set up Java
uses: actions/setup-java@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
uses: gradle/actions/setup-gradle@aa23778d2dc6f6556fcc7164e99babbd8c3134e4 # pin@v4

- name: Run Gradle tasks
if: runner.os != 'Windows'
Expand Down
30 changes: 7 additions & 23 deletions .github/workflows/test-matrix-agp-gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,14 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}

# - name: Run ./gradlew (Fixes Gradle < 7.4)
# continue-on-error: true
# uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
# with:
# cache-read-only: ${{ github.ref != 'refs/heads/main' }}
# gradle-version: ${{ matrix.gradle }}
# arguments: tasks

- name: Build the Release variant
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@aa23778d2dc6f6556fcc7164e99babbd8c3134e4 # pin@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-version: ${{ matrix.gradle }}
arguments: assembleRelease

- name: Build the Release variant
run: gradle assembleRelease

- name: Check sentry-debug-meta.properties inside APKs
run: |
Expand All @@ -95,11 +89,7 @@ jobs:
rm -r output
- name: Build the Release Bundle variant
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-version: ${{ matrix.gradle }}
arguments: bundleRelease
run: gradle bundleRelease

- name: Check sentry-debug-meta.properties inside App Bundle
run: |
Expand All @@ -111,13 +101,7 @@ jobs:
rm -r output
- name: Run Integration Tests
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-version: ${{ matrix.gradle }}
gradle-home-cache-includes: |
**/.gradle-test-kit/caches
arguments: integrationTest
run: gradle integrationTest

- name: Upload Test Results
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Gradle
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2
uses: gradle/actions/setup-gradle@aa23778d2dc6f6556fcc7164e99babbd8c3134e4 # pin@v4

- name: Build the Release variant
run: ./gradlew assembleRelease --no-build-cache | tee gradle.log
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ You can see what exactly we're planning and track progress in [#825](https://git
- Proguard UUID task now depends on the proguard mapping file. I.e. it will only run if the mapping file has changed
- Source context tasks now depend on source file changes, if there are no source changes, the tasks won't run

### Internal

- Switch to a newer `setup-gradle` github action ([#654](https://github.com/getsentry/sentry-android-gradle-plugin/pull/654))

### Dependencies

- Bump CLI from v2.25.0 to v2.28.0 ([#638](https://github.com/getsentry/sentry-android-gradle-plugin/pull/638), [#640](https://github.com/getsentry/sentry-android-gradle-plugin/pull/640), [#642](https://github.com/getsentry/sentry-android-gradle-plugin/pull/642), [#647](https://github.com/getsentry/sentry-android-gradle-plugin/pull/647), [#652](https://github.com/getsentry/sentry-android-gradle-plugin/pull/652))
Expand Down

0 comments on commit 0a3aa18

Please sign in to comment.