Just migrated my pet project to dsl, so far so goo...
# gradle
g
Just migrated my pet project to dsl, so far so good. Glad to be in a club 😉 . I keep my dependencies in a separate file in
buildSrc
(good explanation: https://caster.io/lessons/gradle-dependency-management-using-kotlin-and-buildsrc-for-buildgradle-autocomplete-in-android-studio). Obviously, all the checks for updates are gone. How do you deal with it? Any custom plugins that tackle this inconvenience?
o
I have a Gradle initscript setup to apply this plugin + some configuration
if (project.hasProperty("versions"))
, so you can do
gradle :depUpdates -Pversions
and get updates, even if the plugin isn't part of your project
g
worked as expected, thanks! Could you be so kind to elaborate on
initsript
? Maybe you've got a github link handy.
o
unfortunately I don't, and I'm away from my computer right now. I'll gist it as soon as I can
c
It is beautifully explained in gradle official documentation: https://docs.gradle.org/current/userguide/init_scripts.html Very useful feature
👍 1
j
@ghedeon @Czar FYI I made a wrapper around the gradle-versions-plugin that specifically targets the
buildSrc
module https://github.com/jmfayard/buildSrcVersions
g
@jmfayard thanks! Is it possible to customize the names of generated files?
j
@ghedeon Not currently. You can open an issue with your use case if you feel that's important.