Hi. I'm a developer of a Gradle plugin that uses `...
# plugin-development
d
Hi. I'm a developer of a Gradle plugin that uses
TransformAction
. There is a case when
inputArtifact
for
TransformAction
doesn't exist (But it has to be an output artifact of an another subproject). What's the proper way to handle this case? And what are the possible causes of it?
v
The only case where I have seen this happen is, when there is a bug somewhere and you should never gracefully handle it, but throw an exception. Most probably it will just be absent on a clean build but there on an incremental build, which just makes it worse as you then transform always a stale artifact (the one from last build) and that result will be used further on. These bugs can be in plugins, build scripts, or also in Gradle itself like these: https://github.com/gradle/gradle/issues/29847 https://github.com/gradle/gradle/issues/27372 Unfortunately, there is still no protection against prematurely evaluated artifact transforms. With https://github.com/gradle/gradle/issues/11100 hopefully something is coming. I was told they leave look at it this year, but we'll see.