Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Do not use `gradle/actions/setup-gradle` with `arguments`; replace with two steps

Abierto
#100 1 comentario 0 reacciones 0 asignados Ver en GitHub

@Wanbinyu ya está trabajando en esto.

Desde el 16/9/2026.

  • #228 de @Wanbinyu — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions
Área
ci-cd

Línea de trabajo

Comienza localizando la receta que gestiona los pasos de gradle/actions/setup-gradle mediante el parámetro arguments y revisa las pruebas unitarias de la receta. Usa los ejemplos YAML de antes y después como la transformación esperada, incluido el manejo de build-root-directory y working-directory. Se considera terminado cuando las ejecuciones obsoletas basadas en arguments se convierten en un paso de setup seguido de pasos run para los comandos de Gradle.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

recipe

What problem are you trying to solve?

Using the action to execute Gradle via the arguments parameter is deprecated
The core functionality of the setup-gradle (and gradle-build-action) actions is to configure your Gradle environment for GitHub Actions. Once the action has run, any subsequent Gradle executions will benefit from caching, reporting and other features of the action.

Using the arguments parameter to execute Gradle directly is not necessary to benefit from this action. This input is deprecated, and will be removed in the v4 major release of the action.

To convert your workflows, replace any steps using the arguments parameter with 2 steps: one to setup-gradle and another that runs your Gradle build.

\https://github.com/gradle/actions/blob/main/docs/deprecation-upgrade-guide.md#using-the-action-to-execute-gradle-via-the-arguments-parameter-is-deprecated

What precondition(s) should be checked before applying this recipe?

Uses gradle/actions/setup-gradle

Describe the situation before applying the recipe

steps:
- name: Assemble the project
  uses: gradle/actions/setup-gradle@v3
  with:
    arguments: 'assemble'

 - name: Run the tests
   uses: gradle/actions/setup-gradle@v3
   with:
     arguments: 'test'

 - name: Run build in a subdirectory
   uses: gradle/actions/setup-gradle@v3
   with:
     build-root-directory: another-build
     arguments: 'build'

Describe the situation after applying the recipe

- name: Setup Gradle
  uses: gradle/actions/setup-gradle@v3

- name: Assemble the project
  run: ./gradlew assemble

- name: Run the tests
  run: ./gradlew test

- name: Run build in a subdirectory
  working-directory: another-build
  run: ./gradlew build

Any additional context

Using the action in this way gives you more control over how Gradle is executed, while still giving you all of the benefits of the setup-gradle action.

The arguments parameter is scheduled to be removed in setup-gradle@v4.

Note: if you are using the gradle-build-action, see here for more details on how to migrate.

Lenguaje dominante
Java
Estrellas
1
Forks
9
Merge medio
45 min
PR fusionados (30 d)
7

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openrewrite/rewrite-github-actions

Todos los issues de openrewrite/rewrite-github-actions

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.