Add Warning "A newer version of ..... is available" for custom library
Asked Answered
G

2

2

I've just released my library with version 1.2.1, code is in Github

As you can see in the picture: enter image description here

I'm getting "Warning" that i'm using old version of appcompat library but there's no warning for my library.

I've distribute my library via Bintray to maven & jcenter.

Does anyone knows how to enable this Note/Warning on my library line?

Gilemette answered 27/4, 2017 at 14:14 Comment(0)
D
2

The problem is that regardless of which repository your library is resolved from (being it jcenter(), mavenCentral() or any other repository), the check for the latest version is hardcoded to go to Maven Central.

That's plain wrong, if you ask me, but it is what it is at the moment (we'll work on reporting it as a bug and submitting a pull request). Until it is changed, the only way to guarantee your library will be correctly reported by this intention is to publish your library to Maven Central. Good news are that if your library is already in JCenter, it's very easy to sync it to Maven Central as well.

Deploy answered 1/5, 2017 at 18:12 Comment(1)
Unfortunately, this didn't work out. Probably the Maven url has changed(( Still looking for a solution...Ewen
R
0

As Sneh Pandya pointed out. This is a setting you can enable.

In Android studio 2.3.1 you can enable this if you go to File --> Settings --> Editor --> Inspections. You can than search for library and enable the "Newer Library Version Available "lint-check. This will check for for newer versions of any MavenCentral dependencies. This will however slow down your builds.

enter image description here

Randarandal answered 30/4, 2017 at 9:8 Comment(2)
This is not correct answer, I'm already getting the note for the appcompat library, but not on my library. The option is already checked in my settings.Gilemette
That's an answer to a different question.Deploy

© 2022 - 2024 — McMap. All rights reserved.