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

Incorrect gradle project analysis on multi-module projects when subprojects have the same name #151

Closed
ologe opened this issue Mar 11, 2022 · 4 comments · Fixed by #163
Closed
Labels
Bug Bug issue type Feature Feature request issue type Kover Gradle Plugin
Milestone

Comments

@ologe
Copy link

ologe commented Mar 11, 2022

I'm playing with Kover (v0.5.0) these days and I noticed a weird behaviour on multi-module projects with a nested hierarchy. When there are submodules with the same name, Kover often analyses the wrong project.

Given the following project structure:

:feature
  :first
  :another-nesting
     :first
     :second
  :nested
     :first
     :second

./gradlew :feature:first:koverHtmlReport is analyzing :feature:nested:first

Screenshot 2022-03-11 at 11 53 00

./gradlew :feature:nested:first:koverHtmlReport is correct

Screenshot 2022-03-11 at 11 53 30

./gradlew :feature:another-nesting:first:koverHtmlReport is analyzing again :feature:nested:first

Screenshot 2022-03-11 at 11 53 53


Zero configuration from my side, just applied the plugin.

Downgraded to v0.4.4 and everything works fine.

Everything should be reproducible in this repo https://github.com/ologe/kover-testing

@shanshin
Copy link
Collaborator

Hi,
currently, the plugin uses only a short project name.
We will take this issue into account when designing the new API.

@shanshin shanshin added Bug Bug issue type Kover Gradle Plugin Feature Feature request issue type labels Mar 23, 2022
@shanshin
Copy link
Collaborator

Relates #19

@charlesng
Copy link

@shanshin Is there any workaround or release plan for this fix? In my project we used multi module arch and it hurts a lot on the coverage report because of this 😢

@driver733
Copy link

@shanshin Is there any workaround or release plan for this fix? In my project we used multi module arch and it hurts a lot on the coverage report because of this 😢

It's probably related to the way Gradle works, that is, it treats different submodules with the same name as the same dependency.

See gradle/gradle#16885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug issue type Feature Feature request issue type Kover Gradle Plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants