gradle-execfork-plugin
gradle-execfork-plugin copied to clipboard
workingDir should not be an @InputDirectory
I question the wisdom of the annotation in AbstractExecTask to declare workingDir as an input directory. This should be left to the consumers that use the tasks to declare additional file/directory inputs. The workingDir is likely to be undesirable and most often too unstable to be an incremental execution up-to-date criterion.
Can we remove the @InputDirectory from the code and let the users choose what might constitute a valid input file or directory?
I just ran into seemingly exactly this issue while integrating springdoc-openapi-gradle-plugin into our own autoconfigure-gradle-plugin.
All the detailed information can be found in the 2 issues referenced above.
@psxpaul is there any intention on changing this? If so any preferred way? I would be willing to create a PR for it.
Wanted to give my +1 since this is causing the build to require a large number of explicit dependencies to be set for the task when in reality it is just starting Xvfb and doesn't depend on any previous tasks.
Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':bot-client:compileJava' as an input of ':bot-client:startXvfb'.
2. Declare an explicit dependency on ':bot-client:compileJava' from ':bot-client:startXvfb' using Task#dependsOn.
3. Declare an explicit dependency on ':bot-client:compileJava' from ':bot-client:startXvfb' using Task#mustRunAfter.
Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':bot-client:compileKotlin' as an input of ':bot-client:startXvfb'.
2. Declare an explicit dependency on ':bot-client:compileKotlin' from ':bot-client:startXvfb' using Task#dependsOn.
3. Declare an explicit dependency on ':bot-client:compileKotlin' from ':bot-client:startXvfb' using Task#mustRunAfter.
Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileTestKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':bot-client:compileTestKotlin' as an input of ':bot-client:startXvfb'.
2. Declare an explicit dependency on ':bot-client:compileTestKotlin' from ':bot-client:startXvfb' using Task#dependsOn.
3. Declare an explicit dependency on ':bot-client:compileTestKotlin' from ':bot-client:startXvfb' using Task#mustRunAfter.
Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:shadowDistTar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':bot-client:shadowDistTar' as an input of ':bot-client:startXvfb'.
2. Declare an explicit dependency on ':bot-client:shadowDistTar' from ':bot-client:startXvfb' using Task#dependsOn.
3. Declare an explicit dependency on ':bot-client:shadowDistTar' from ':bot-client:startXvfb' using Task#mustRunAfter.
Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:shadowDistZip' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':bot-client:shadowDistZip' as an input of ':bot-client:startXvfb'.
2. Declare an explicit dependency on ':bot-client:shadowDistZip' from ':bot-client:startXvfb' using Task#dependsOn.
3. Declare an explicit dependency on ':bot-client:shadowDistZip' from ':bot-client:startXvfb' using Task#mustRunAfter.