-
Notifications
You must be signed in to change notification settings - Fork 954
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: add support for dependencies in buildSrc #2180
Gradle: add support for dependencies in buildSrc #2180
Comments
Gradle 6.8 will include a new official dependencies management. Source: gradle/gradle#14896 |
Apologies for bumping this thread, but I felt it was worth mentioning that the new dependencies management moved over to the 7.0 RC1 milestone on December 8. In case you're already on 6.8 and want to try this out, as I was. Further progress is tracked in gradle/gradle#15352. |
Gradle 7.0 milestone1 is available and the stable version should be available before February ends. |
What happened to the support for buildSrc? |
You should stop using buildSrc and move to catalogs, it is not recommend by Gradle. |
Version catalogs is what was introduced in 7.0. It's still in preview, however. |
How is it not recommended by Gradle? I have been following their guide to setup my multi-project build and was told to use buildSrc for that. They even mention project dependencies specifically and declare a dependency on It would be pretty nice if dependabot was able to scan the files under |
Because it breaks some caches. There is multiple workaround to use catalogs inside precompiled plugins. |
Are you saying that Gradle wants me to use some workarounds to use catalogs with I thought this was a bug of dependabot which is how I got here and am a bit confused about the state of this issue. Since according to my understanding Gradle still wants people to use Even if workarounds exist to make it work I don't want to put in extra effort to reconfigure the project and potentially mess something up. If dependabot is not going to support this case that's fine with me. I'll need to monitor the dependencies myself then, so some kind of heads up about that would be appreciated. Edit: reworded my initial question, since it sounded quite rude and I think I misunderstood the comment above. |
@jeliebig, I didn't say you should use one or another, using catalogs doesn't imply not using precompiled catalogs. I am using precompiled plugins AND catalogs every single day, for single or multi-project builds. I was using precompiled plugins + dependency management in buildSrc since 2019 and I still use precompiled plugins but without having the dependency management in buildSrc, moving it to Version Catalogs. Why do you have to hardcode the strings + versions directly in the precompiled plugins and/or buildSrc object/classes instead of getting the catalog INSIDE buildSrc precompiled plugins and get the deps from there, and adding them to the dependencies block in your precompiled plugin? You should use Version Catalogs for dependency management, something completely unrelated to precompiled plugin feature. You can get the deps from the Version Catalogs and apply them inside buildSrc precompiled plugins. That means if you update your deps, you have to change nothing in |
Oh that doesn't sound that hard to do! But what you just described sounds pretty easy to me. I guess I'll give it another try and see if it works. Although it doesn't solve this issue, this might be acceptable to just get it working at the moment. Thank you for your patience with me! |
we need an isolated config until the following issue is resolved: dependabot/dependabot-core#2180
According to dependabot/dependabot-core#2180 Dependabot does not support buildSrc dependencies (yet). Hence, dependencies should not be defined there. Closes #76
According to dependabot/dependabot-core#2180 Dependabot does not support buildSrc dependencies (yet). Hence, dependencies should not be defined there. Closes #76
According to dependabot/dependabot-core#2180 Dependabot does not support buildSrc dependencies (yet). Hence, dependencies should not be defined there. Closes #76
According to dependabot/dependabot-core#2180 Dependabot does not support buildSrc dependencies (yet). Hence, dependencies should not be defined there. Closes #76
According to dependabot/dependabot-core#2180 Dependabot does not support buildSrc dependencies (yet). Hence, dependencies should not be defined there. Closes #76
Complex build logics still need |
did this just got released? I see a lot of PR:s in my buildsrc today :) |
Same here. Looks like "something" was released. Where can we find any details? |
Alright, found minute after asking a question (so typical...). See: #5028 |
So.. this can be closed now?? 😮 🎉 |
I'll do a reaction-driven issue close then! :) |
This is no longer needed (and results in duplicate PRs), following this issue being closed: dependabot/dependabot-core#2180
This is no longer needed (and results in duplicate PRs), following this issue being closed: dependabot/dependabot-core#2180
Gradle has a concept of
buildSrc
(https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources) that provides logic for the project build files.Also it is possible to define there a dependencies (even using common Kotlin files): https://github.com/JLLeitschuh/ktlint-gradle/blob/master/plugin/buildSrc/src/main/kotlin/PluginDependencies.kt
Please add support to updating dependencies defined in
buildSrc
folder in Groovy, Java or Kotlin file (please also keep in mind closed dependabot/feedback#392)The text was updated successfully, but these errors were encountered: