The schemaPaths input property of the GenerateJavaTask currently doesn't accept a Provider or a FileCollection.
If you resolve the graphql schema from an external dependency, that means you have to resolve that configuration at configuration time.
It is also a set of path string annotated with @Input rather than a set of files annotated with @InputFiles or @Classpath, so Gradle cannot determine whether files are up-to-date for task avoidance.
The plugin already does this correctly for the dgsCodegenClasspath ConfigurableFileCollection input in the same class annotated with @Classpath, making this inconsistent.
Can this be adjusted, so we can
- avoid configuration-time dependency resolution
- benefit from content-based up-to-date checking
- have type-safe input checking: a
Set<File> accidentally passed as a single list element converted to the String literal [/path/to/schema.graphqls], brackets included, and the first sign of the mistake was a compilation failure in a downstream consumer.
The
schemaPathsinput property of theGenerateJavaTaskcurrently doesn't accept aProvideror aFileCollection.If you resolve the graphql schema from an external dependency, that means you have to resolve that configuration at configuration time.
It is also a set of path string annotated with
@Inputrather than a set of files annotated with@InputFilesor@Classpath, so Gradle cannot determine whether files are up-to-date for task avoidance.The plugin already does this correctly for the
dgsCodegenClasspathConfigurableFileCollectioninput in the same class annotated with@Classpath, making this inconsistent.Can this be adjusted, so we can
Set<File>accidentally passed as a single list element converted to the String literal[/path/to/schema.graphqls], brackets included, and the first sign of the mistake was a compilation failure in a downstream consumer.