-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
buildSrc dependencies leaks are not visible in gradlew buildEnvironment #8301
Comments
Unfortunately, the So the best idea I have to fix the reporting would be for Unfortunately the Gradle team have limited capacity to work on improvements, and prioritization is hard. @Tolriq would you be interested in helping out with a fix? |
In a big Gradle project this can be really confusing and time consuming to debug. Guava versions below 21 have been causing issues for so long, and so many libraries depend on such versions. It is not straightforward at all to look into |
@Tolriq long time no see 👋. @Tolriq @rkrisztian @autonomousapps @martinbonnin @deeTEEcee What's the reason for having a mix of @bigdaz Do you think that moving all the dependencies to be declared in |
Lots of plugins don't publish proper descriptors, and so you have to use the classpath approach. I don't think I should be forced to declare all dependencies in buildSrc? |
For what it's worth, when I'm in need of a I know the Gradle team is moving to convention-plugins and using them from regular included builds (and not |
* Update Kotlin Gradle Plugin to 1.9.0 * Update Android Gradle Plugin to 4.2.2 * Introduce convention plugin for Gradle runner gradle/gradle#8301 * Fix unit test `common, jvm and macos source sets with kotlin multiplatform` * Update compiler to 1.9.0 * Update integration test * Add empty target for WASM integration test to avoid single target project See #3038 * Remove unused `plugins.shadow` from toml
* Update Kotlin Gradle Plugin to 1.9.0 * Update Android Gradle Plugin to 4.2.2 * Introduce convention plugin for Gradle runner gradle/gradle#8301 * Fix unit test `common, jvm and macos source sets with kotlin multiplatform` * Update compiler to 1.9.0 * Update integration test * Add empty target for WASM integration test to avoid single target project See #3038 * Remove unused `plugins.shadow` from toml (cherry picked from commit f5393dd)
The issue is in the backlog of the relevant team and is prioritized by them. We may probably fix this before doing any changes to the classloader structure, but this is unlikely to happen in the short or medium term. |
Expected Behavior
I have read #4741 and understood that it's normal that the buildSrc dependencies currently leak even if using
implementation
.But due to the lack of resolution this can cause build issues because any dependency declared in buildSrc will override later declarations.
While this is an issue the main issue is that
gradlew buildEnvironment
does not report the dependencies from buildSrc but the normal declarations. Making very very hard to debug dependencies issues when there's no direct build issues.Current Behavior
gradlew buildEnvironment
does not return the real dependencies that are used!Context
My project is build with wrong dependencies used and since there was no errors I had no way to know that I was using the wrong ones.
Steps to Reproduce (for bugs)
Gradle 5.1.1 / Windows
In buildSrc/build.gradle.kts
in the application root build.gradle.kts
Running
gradlew buildEnvironment
will produceBut in reality version 3.3.0 will be used. If the plugin does not log it's version it's virtually impossible to know that wrong dependency is used.
The text was updated successfully, but these errors were encountered: