Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 7 incompatibility due to implicit dependency #163

Closed
smourapina opened this issue Aug 17, 2021 · 5 comments · Fixed by #166 or #167
Closed

Gradle 7 incompatibility due to implicit dependency #163

smourapina opened this issue Aug 17, 2021 · 5 comments · Fixed by #166 or #167

Comments

@smourapina
Copy link

Running gradle-scoverage under Gradle 7 (in this case 7.1.1.) results in the following warnings for multiple coverage tasks:

> Task :some-module:jar
Execution optimizations have been disabled for task ':some-module:jar' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/some-module/build/libs/some-module.jar'. Reason: Task ':some-module:reportTestScoverage' uses this output of task ':some-module:jar' 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.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Can you please check this issue?

@maiflai
Copy link
Contributor

maiflai commented Aug 17, 2021

It's a known issue and being looked at as part of #150.

I agree it means that Gradle cannot optimise the task, but I think it's not something that prevents the current use of the plugin?

@smourapina
Copy link
Author

Thanks for the quick feedback @maiflai. Indeed it does not prevent the use of the plugin, but it would be good to fix it!

If it is ok, I will leave this issue open for the time being, as a reference in case other users experience the same.

eyalroth added a commit to eyalroth/gradle-scoverage that referenced this issue Aug 21, 2021
…red dependency between report and jar tasks
@eyalroth
Copy link
Contributor

I don't think this is related to #150.

I opened a PR that should fix this warning.

@smourapina
Copy link
Author

Much appreciated @eyalroth, thank you!

@smourapina
Copy link
Author

I have tried this in the meantime, and the change does indeed get rid of the message above for dependency on the :some-module:jar task.

However, I still have warnings for the following tasks:

  • :some-module:test
  • :some-module:acceptanceTest
  • :some-module:compileAcceptanceTestJava
  • :some-module:compileAcceptanceTestScala
  • :some-module:processAcceptanceTestResources
  • :some-module:reportAcceptanceTestScoverage

From what I understand from the change introduced, these tasks should have been included even before, with the dependency on testTask, but it does not seem to be the case.

Can you please reopen this and take a look @eyalroth or @maiflai ?

eyalroth added a commit to eyalroth/gradle-scoverage that referenced this issue Aug 28, 2021
…red dependency between report task and test tasks outputs
eyalroth added a commit to eyalroth/gradle-scoverage that referenced this issue Sep 4, 2021
…red dependency between report task and test tasks outputs
eyalroth added a commit to eyalroth/gradle-scoverage that referenced this issue Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants