Skip to content

GitLab CI Kotlin DSLopensavvy.gitlab.ci.pluginsGradle

Gradle

class Gradle

Plugin to use the Gradle build tool within pipelines.

This plugin automatically configures wrapper caching and test reporting.

Example

gitlabCi {
    val build by job {
        useGradle()

        script {
            gradlew.task("build")
        }
    }
}

Job extensions

  • useGradle: Enables the plugin and preconfigures GitLab to import test reports.

See also

Types

Companion

object Companion

Functions

task

fun task(task: String): 

Executes the Gradle task named task.

tasks

fun tasks(vararg tasks: String): 

Executes the Gradle tasks named tasks.

fun tasks(tasks: Iterable<String>): 

Executes the Gradle tasks named tasks.