service
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.invocation.Gradle.service.
Since
9.8.0
See also
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.Task.service.
Since
9.8.0
See also
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.Project.service.
Since
9.8.0
See also
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.initialization.Settings.service.
Since
9.8.0
See also
Looks up a service provided by Gradle for use in this project.
Return
the service instance
Since
9.8.0
Type Parameters
the type of the service to look up
See also
Throws
when the given type is not one of the services available in this scope
Looks up a service provided by Gradle for use in this task.
The lookup can be used both at configuration time and from task actions at execution time, and is safe to use with the configuration cache:
tasks.register("cleanThing") {
doLast {
service<FileSystemOperations>().delete {
delete("thing")
}
}
}Return
the service instance
Since
9.8.0
Type Parameters
the type of the service to look up
See also
Throws
when the given type is not one of the services available in this scope
Looks up a service provided by Gradle for use in this build.
Return
the service instance
Since
9.8.0
Type Parameters
the type of the service to look up
See also
Throws
when the given type is not one of the services available in this scope
Looks up a service provided by Gradle for use in init scripts and Gradle plugins.
Return
the service instance
Since
9.8.0
Type Parameters
the type of the service to look up
See also
Throws
when the given type is not one of the services available in this scope