[Wrong Docs] InputChanges is not provided to TransformAction

Here:

https://docs.gradle.org/current/userguide/artifact_transforms.html#implementing_incremental_artifact_transforms

the tutorial said I can get a InputChanges instance by @get:Inject, but when I run this on gradle 8.6.:

org.gradle.internal.service.UnknownServiceException: No service of type interface org.gradle.work.InputChanges available.
        at org.gradle.api.internal.artifacts.transform.DefaultTransform$TransformServiceLookup.get(DefaultTransform.java:482)
        at Build_gradle$Publize$Inject1.getInputChanges(Unknown Source)
        at Build_gradle$Publize.transform(build.gradle.kts:72)
        at org.gradle.api.internal.artifacts.transform.DefaultTransform.transform(DefaultTransform.java:276)
        at org.gradle.api.internal.artifacts.transform.AbstractTransformExecution$2.call(AbstractTransformExecution.java:143)
        at org.gradle.api.internal.artifacts.transform.AbstractTransformExecution$2.call(AbstractTransformExecution.java:137)
...

all you need is to add this:

    @get:Inject
    abstract val inputChanges: InputChanges

and it crashes

If that is the case, you should open a bug report if there is none yet. :slight_smile: