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

Gradle - Canonical version from gradle.properties #2046

Closed
monowai opened this issue Jan 23, 2020 · 4 comments
Closed

Gradle - Canonical version from gradle.properties #2046

monowai opened this issue Jan 23, 2020 · 4 comments

Comments

@monowai
Copy link

monowai commented Jan 23, 2020

Similar to issue 775

I manage versions using gradle.properties. I've found this to be the safest way of registering a version for plugins and classpath dependencies.

When I have the version number set directly in build.gradle, dependencies are correctly detected as out of date.

When set as a variable, Dependabot seems unable to resolve the version of the library I'm using and simply says
Looks like these dependencies are no longer a dependency, so this is no longer needed.

For example:
Resilience4J, I have
gradle.properties -> resilience4jVersion=1.1.0
build.gradle -> io.github.resilience4j:resilience4j-spring-boot2:$resilience4jVersion

@infin8x infin8x transferred this issue from dependabot/feedback Jun 29, 2020
@fnobilia
Copy link

Any updates on this issue? =)

@missedone
Copy link

looks like duplicates with #1618

@monowai
Copy link
Author

monowai commented Feb 23, 2021

Not quite duplicates but #1618 does explain how to obtain the same result through a bit of reconfiguration and many thanks for pointing that out.

Moving the library properties from gradle.properties and into build.gradle in the root project resolves this issue.
for example:

buildscript {
    ext{
        springBootVersion='2.3.8.RELEASE'
        ...

So while setting the propeties in gradle.properties works fine for Gradle, it does not work for dependabot which expects them to be in build.gradle

My working config for referece

@monowai monowai closed this as completed Feb 23, 2021
@cricketsamya
Copy link

Try this out.
https://cricketsamya.github.io/posts/dependabot-with-gradle/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants