I'm building a large multi-module Android library, and need to publish the library to an internal company Artifactory.
Should I use the old maven
plugin, or the new maven-publish
plugin?
Note: The above two official plugins don't fully support Android, so there are two community ports.
Also interesting - the Android Tools team deprecated the experimental gradle plugin that was based around the SoftwareComponent model - which is what the maven-publish
plugin uses. Is maven-publish
deprecated too then?
I would recommend you to use new maven publish plugin. Gradle deprecated the old maven plugin with Gradle 1.3. According to this Gradle blog post only parts of the SoftwareComponent model will be marked as deprecated and the rest is going to be ported:
If you want an example for the
maven-publish
, Realm-Java uses it: https://github.com/realm/realm-java/blob/master/realm/realm-library/build.gradle