-->

JFrog Bintray:delete package and relink to JCenter

2019-08-31 04:03发布

问题:

I am newbie to publishing library to Jcenter. I had uploaded my Android gradle plugin library to JFrog artifactory.The library is

https://bintray.com/mmrx/pngquantGradlePlugin/pngcompress

And then,I clicked the button 'link to jcenter'and it linked to jcenter successful.

compile 'com.mmrx.pngcompress:pngcompress:1.0.0' was worked in my Android project.

after a while,i found some bugs in the plugin library,and deleted the version 1.0.0 which had lined to the jcenter before.And uploaded the new library to the jforg artifactory with the version code 1.0.0.

below the "Linked to" label,the JCenter icon still there.

Then i found the "compile 'com.mmrx.pngcompress:pngcompress:1.0.0'" was not working.the error message is

Error:Could not find com.mmrx.pngcompress:pngcompress:1.0.0. Searched in the following locations: file:/D:/AndroidStudio3/android-studio/gradle/m2repository/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.pom file:/D:/AndroidStudio3/android-studio/gradle/m2repository/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.jar https://dl.google.com/dl/android/maven2/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.pom https://dl.google.com/dl/android/maven2/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.jar https://jcenter.bintray.com/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.pom https://jcenter.bintray.com/com/mmrx/pngcompress/pngcompress/1.0.0/pngcompress-1.0.0.jar Required by: project :

I want to update the library in JCenter.Any suggestions?

Recreate a new repository and upload my library and link to JCenter again?

回答1:

No need to recreate another one. To update a library on JCenter you need to update your library version name and version code, and then rebuild and upload into Bintray again, after upload success then you click on Publish new version.

=> Then your library will available in JCenter.

If the old version already on jCenter so whenever you update version of the library you no need to "Add to jCenter" again, it will automatically do that you only need to increase your library version and upload to Bintray is enough