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 fails to resolve project dependencies against Scala projects #6750
Comments
Can confirm the issue |
@drujd @jakubhava Could you give You can upgrade with |
Hey @drujd @jakubhava, have you had a chance to try the nightly out? If it looks good to you, this will become 4.10.2 |
Sorry for late answer, going to test now! Thank you! |
@big-guy works fine, thx! |
Thanks @jakubhava |
I can also confirm that the issue is resolved in the nightly. |
Thanks @drujd |
I still see this in gradle 4.10.2 with a Scala subproject that depends on a Java subproject:
|
@dsilvasc could you share a reproducible build? What's And please open a new issue so this doesn't get lost. |
We are seeing the same results with
|
@big-guy It's an in-house plugin -- let me see if I can trim it down to a minimal repro... |
Thanks @dsilvasc! Do you happen to have a task that takes all configurations in a project and resolves them? @rpalcolea a reproduction case would be helpful or some description of the task that's failing. |
@big-guy yes, the task starts with project.configurations.each { configuration ->
if (!configuration.isCanBeResolved()) {
return
}
...
} The goal there is to find all jars in all configurations, unzip them, list all the classes, find classes that appear in multiple jars (multiple dependencies), and fail the build if there are any. Similar to these: |
@dsilvasc as a workaround to get you going again, you can try:
Sorry for all the trouble. |
@big-guy Thanks -- that fixes it. |
Hi @big-guy, while this might fix the issue. Is there any work on gradle side to prevent the need for this workaround? can this issue be re-open? |
@rpalcolea Yes, I've looked at fixing it. I won't reopen this issue since it's slightly different (but related). I created #6854 |
Awesome! thank you! |
Either I miss something or this bug persists in Gradle 5.0
The project itself contains just hello world with dummy case class. |
@lure That's a very different looking problem. Could you open a new issue with a reproducible example? Did the project work with an earlier version of Gradle? |
It seems that the issue is somewhere in my gradle build files. It cant be reproduced on helloworld example. Basically, I have multi-module project with
And buildfile in module
and then
|
@lure would you be able to create a build scan for the failing build? |
upd, for clarification purposes:
causes the failures mentioned above. If removed - everything works smoothly |
same (or similarly looking) problem with Gradle 4.10.3, Scala project. this snippet helps:
|
We're experiencing this issue with Gradle 5.6.4. The workaround with
Full stack trace: https://gist.github.com/mockitoguy/b5b5fb3d172ee2374d5c603edb0151ea |
I've spent quite a few sleepless hours trying to figure out what's wrong. At least I found this thread. Still reproducible with Gradle 6.8.3. |
Had the same issue after upgrading to grade 7.1.1 I put the suggestion from alexeyOnGitHub into my build.gradle and the error disappeared. |
In 4.10.1, we introduced another variant for Scala projects to share analysis files between projects.
This build passes in 4.10 and before:
In 4.10.1, this fails with:
The text was updated successfully, but these errors were encountered: