This message was deleted.
# community-support
s
This message was deleted.
v
I don't think there is a reliable way, except maybe checking all task output paths whether they contain the given directory. I would just provide the user of the plugin a way to configure which paths to ignore. An even better way if possible is to use an in-line hint, like if the class is annotated with an annotation that has "Generated" as simple name, then exclude it. That is how for example JaCoCo and also some others handle it.
👍 1
Btw. even the Gradle built-ins are not consistent. For example annotation processor results go to
build/generated/sources/annotationProcessor
while Antlr output goes to
build/generated-src/antlr/
, and Kotlin DSL accessors in plugin projects go to
build/generated-sources/
s
The common thread is that they are all under
build
anything under build would be generated, but you can't be sure of other places.
v
Still very flaky. I've seen several build logic projects where you have
com.example.build.whatever
. And also builds that generate to
src/main/generated
.
s
Agreed, I meant anything under the
project.buildDir
is generated, and like I said, you can't be sure of anything found elsewhere. Though it is really bad practice to have anything generated that doesn't go somewhere under the build dir. Similar things caused all sorts of issues when I tried to work with the
cpp-library
plugin on an existing Visual Studio project - The source was in the project root, so the build dir was a subfolder of the source dir... what I nightmare.