

LIBRARY_PUBLISH_SOURCES = true // default is true LIBRARY_PUBLISH_DOCS = true // default is true // The user/organization that owns the repository GITHUB_OWNER = githubuser // The name of the repository that contains your module GITHUB_REPOSITORY = Library // Maven repository url will be: // The user with permissions to publish to the repository GITHUB_USER = githubuser GITHUB_TOKEN = PlaceThisInYourHomeGradlePropertiesAndOrCiSecret POM_PACKAGING = aar POM_NAME = Library POM_DESCRIPTION = A sample library that will be published to github packages POM_URL = https: ///githubuser/Library POM_SCM_URL = https: ///githubuser/Library POM_SCM_CONNECTION = scm: git : githubuser / Library.

For each library of your project, add this to your gradle.properties: The instructions are almost the same as the ones over gradle-mvn-push. Bundles the aar, javadocs and sources to be publishedįeel free to modify the plugin for your own needs.Generates the javadocs from java/kotlin files (using dokka if it’s available and properly setup in the project).Specifies the maven repository and its credentials.

The Android gradle plugin will now generate a proper POM file based on the project’s dependencies.įor publishing maven packages, I use an adapted version of Chris Banes’ goodie gradle-mvn-push which you can find here: publish_adle You can read more about the maven-publish plugin here. With the recent release of Android Studio 3.6, publishing to maven repositories got simpler. Instead, you should define GITHUB_USER and GITHUB_TOKEN in an untracked properties file or pass them directly using the gradlew -P parameter for the publish task. These credentials shouldn’t be added to your git repository.
