Publishing Android libraries to MavenCentral in 2021

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • stream-chat-android

    :speech_balloon: Android Chat SDK ➜ Stream Chat API. UI component libraries for chat apps. Kotlin & Jetpack Compose messaging SDK for Android chat

    afterEvaluate { publishing { publications { release(MavenPublication) { // The coordinates of the library, being set from variables that // we'll set up later groupId PUBLISH_GROUP_ID artifactId PUBLISH_ARTIFACT_ID version PUBLISH_VERSION // Two artifacts, the `aar` (or `jar`) and the sources if (project.plugins.findPlugin("com.android.library")) { from components.release } else { artifact("$buildDir/libs/${project.getName()}-${version}.jar") } artifact androidSourcesJar artifact javadocJar // Mostly self-explanatory metadata pom { name = PUBLISH_ARTIFACT_ID description = 'Stream Chat official Android SDK' url = 'https://github.com/getstream/stream-chat-android' licenses { license { name = 'Stream License' url = 'https://github.com/GetStream/stream-chat-android/blob/main/LICENSE' } } developers { developer { id = 'zsmb13' name = 'Márton Braun' email = '[email protected]' } // Add all other devs here... } // Version control info - if you're using GitHub, follow the // format as seen here scm { connection = 'scm:git:github.com/getstream/stream-chat-android.git' developerConnection = 'scm:git:ssh://github.com/getstream/stream-chat-android.git' url = 'https://github.com/getstream/stream-chat-android/tree/main' } } } } } }

  • publish-plugin

    Gradle plugin for publishing to Nexus repositories

    To easily automate publishing later, you'll use the gradle-nexus/publish-plugin tool. This has to be added in your project level (root) build.gradle file as a dependency.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts