melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
667 stars 88 forks source link

Missing dependency on processTestResources, compileJava and compileScala #207

Closed galargh closed 3 years ago

galargh commented 3 years ago

Using me.champeau.jmh@0.6.5 and gradle@7.2-rc-1 and scala plugin, when executing compileJmhScala - Gradle warns about using outputs from tasks which are not declared as dependencies (processTestResources, compileJava, compileScala).

> Task :A:compileJmhScala
Execution optimizations have been disabled for task ':A:compileJmhScala' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '~/A/build/resources/test'. Reason: Task ':A:compileJmhScala' uses this output of task ':A:processTestResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2-rc-1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '~/B/build/classes/java/main'. Reason: Task ':A:compileJmhScala' uses this output of task ':B:compileJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2-rc-1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '~/B/build/classes/scala/main'. Reason: Task ':A:compileJmhScala' uses this output of task ':B:compileScala' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2-rc-1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
melix commented 3 years ago

Please check with 0.6.6, I think this issue is fixed already

galargh commented 3 years ago

Sure! Thank you :)

galargh commented 3 years ago

Yes, that was it! The upgrade made the warnings go away. Thank you :)