I have published one library called SmartToolbar to jcenter
successfully.
But I have one problem when I update it to new version and publish it again, it does not show suggestion message to update to new version in gradle
.
Currently, the latest version of this library is 1.0.12
, but as you can see in the screenshot, it doesn't show suggestion message to upgrade to version 1.0.12
as a library above it.
I want to fix it because I want to notify to all developers who are using it to get the latest update from my library.
NOTE: It does not show suggestion that have new version is available but we still get the latest update if we know the latest version. So only me that know about the latest version.n
When I publish new version I have updated the versionName
which I create custom variable as PUBLISH_VERSION
to use with my publish-android-library-plugin as bellow screenshot.
So I want to know more which part that I missed when I publish the new version? or in my publish-android-library-plugin has something not correct? Maybe you need to review this raw code for checking my mistake.
NOTE: This library has synced to maven central
*UPDATE *
According to our dear friend JBaruch, he said:
You can read more about his thoughts when answering a similar questions to yours over here: Add Warning "A newer version of ..... is available" for custom library
So, following his suggestion, you can try syncing your library with maven
* PREVIOUS ANSWER: I am leaving this here as I still think it is still important to understand the thinking process behind Android studio's aversion to getting the latest updates *
The version update popup notification is due to a Lint rule in Android Studio, called
Newer Library Versions Available
. According to How to check if gradle dependency has new version, the latest few updates to Android studio has modified that lint rule so users will no longer be notified of new non-Google library versions.JBaruch's answer in How to check what is the latest version of a dependency to use in gradle gives a good reason why Google went with this change:
Google would prefer developers stick to a particular library version and only update when required. So, checking for updates has become a manual process.
So, how can you proceed from here? If you just want to check that Android Studio is notified of your new library update, you can use Android Studio's proper method of checking for updates. You can look at Adam S's answer (the accepted one) in How to check if gradle dependency has new version for instructions to do the update check.