Slackbot
01/07/2024, 11:13 AMAdam
01/07/2024, 12:14 PMval task by tasks.registering {
val archives = serviceOf<ArchiveOperations>
val unzipped = elements.map { archives.zipTree(it) }
}
Ivan CLOVIS Canet
01/07/2024, 1:02 PMVampire
01/07/2024, 6:29 PMserviceOf
though. It is considered internal API, not public API and thus could change any time.Ivan CLOVIS Canet
01/08/2024, 8:56 AMAdam
01/08/2024, 9:28 AMinterface Injected {
@get:Inject val fs: FileSystemOperations
}
tasks.register("someTask") {
val injected = project.objects.newInstance<Injected>()
}
Vampire
01/08/2024, 12:34 PMserviceOf
is in org.gradle.kotlin.dsl.support
which is not part of that list and thus not public API.
Another strong sign is, that you need an explicit import to use id.
And another "strong sign" is, that the author of that function said it is internal API. 🙂