Skip to content

Commit 9dc8c4c

Browse files
Fix setup gradle task config
1 parent 436edbd commit 9dc8c4c

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.github/actions/gradle-task/action.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ runs:
3131
using: 'composite'
3232
steps:
3333

34-
# Around March 2025 we've started seeing jobs fail with what looks like
35-
# a race initialize version catalog (failure to resolve 'libs.', etc.).
36-
# Forcing an initial run of `tasks` fixes that.
37-
- name: Initial Gradle command
38-
shell: bash
39-
run: ./gradlew tasks
40-
4134
- name: Set up JDK
4235
uses: actions/setup-java@v5
4336
with:
@@ -105,16 +98,14 @@ runs:
10598
10699
- uses: gradle/actions/wrapper-validation@v5
107100

108-
# Run the actual task. Note that this still uses setup-gradle for more fine-grained caching.
101+
# Run the actual task.
109102
- name: Run ${{inputs.task}}
110-
uses: gradle/actions/setup-gradle@v5
111-
with:
112-
working-directory: ${{inputs.build-root-directory}}
113-
# These arguments need to be on a single line. If they're defined with wrapping (using `|`),
114-
# something along the way to the actual CLI invocation gets confused and the jvmargs list
115-
# winds up getting parsed as a single argument.
116-
run: ./gradlew ${{steps.gradle-args.outputs.gradle-property-args}} ${{inputs.task}} '-Dorg.gradle.jvmargs=${{steps.gradle-args.outputs.gradle-jvm-args}}'
117-
cache-read-only: false
103+
shell: bash
104+
working-directory: ${{inputs.build-root-directory}}
105+
# These arguments need to be on a single line. If they're defined with wrapping (using `|`),
106+
# something along the way to the actual CLI invocation gets confused and the jvmargs list
107+
# winds up getting parsed as a single argument.
108+
run: ./gradlew ${{steps.gradle-args.outputs.gradle-property-args}} ${{inputs.task}} '-Dorg.gradle.jvmargs=${{steps.gradle-args.outputs.gradle-jvm-args}}'
118109

119110
# Save the build cache to `write-cache-key`.
120111
# Skip if we already had an exact match, or if the key is not set, or if this is a Windows runner.

.github/actions/gradle-tasks-with-emulator/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ inputs:
2929
write-cache-key:
3030
description: 'The unique identifier for the associated cache. Any other consumers or producers for this cache must use the same name.'
3131
default: 'null'
32+
failure-path-upload:
33+
description: 'The relative path to a desired log for upload if the task fails.'
34+
default: 'null'
35+
failure-upload-name:
36+
description: 'The name for the upload of failure reports.'
37+
default: 'specified-upload'
3238

3339
runs:
3440
using: 'composite'
@@ -53,6 +59,8 @@ runs:
5359
restore-cache-key: ${{ inputs.restore-cache-key }}
5460
task: ${{ inputs.prepare-task }}
5561
write-cache-key: ${{ inputs.write-cache-key }}
62+
failure-path-upload: ${{ inputs.failure-path-upload }}
63+
failure-upload-name: ${{ inputs.failure-upload-name }}
5664

5765
# Get the AVD if it's already cached.
5866
- name: AVD cache

0 commit comments

Comments
 (0)