6 steps to Upload your Java and Android libraries to Bintray JCenter using Gradle

Hemanth Sridhar
3 min readJan 21, 2021

JCenter is the easiest way to add your Java artifacts as a part of this massive community. JCenter is a superset repository of maven central.

The most amazing feature is that the sync of your java library inclusion is seamless and immediate after approval.

In order to link a package to JCenter,

  • the artifact first has to be published to Bintray.
  • Then, the user sends a request to Bintray to link the package with JCenter.

Step 1: Create an OSS account in Bintray

  • Click on Sign Up to an Open Source account
  • Choose your desired way of signing up

Step 2: Create a Maven Repository

  • Click on Add new Repository
  • Choose repository type Maven from dropdown

Step 3: Create a Package

  • Click on Add new Package
  • Enter name, Version Control URL and your desired license from dropdown. Click on Create package.
  • IMPORTANT NOTE : Version Control url should not start with http or https.
  • Eg : www.github.com/hemanthsridhar

Step 4: Deployment Setup

  • Your Deployment URL format will be
https://api.bintray.com/maven/${bintrayUsername_OR_bintrayOrganizationName}/${bintrayRepoName}/${bintrayPkgName}/;publish=1

IMPORTANT NOTE : GRADLE 6+

  • If you are using Gradle 6+ and if you have a multi-module project, it is important to disable to .sha512 checksum file generation. This is an issue with bintray which ends up creating junk versions.
  • To do this, in gradle.properties we add the below configuration
systemProp.org.gradle.internal.publish.checksums.insecure=true
  • Sample build.gradle for reference is given below

Step 5: Deployment

  • use the gradle client to deploy
gradle clean publish

Step 6: Add To JCenter

  • Click on Add to JCenter button at the Bintray package page
  • If your package type is pom, then click on is pom project checkbox.
  • Click on the Send button.

THATS IT!

  • After the package is approved, a badge that it is LINKED TO JCenter will appear at the Bintray Package Page

MANDATORY FILE REQUIREMENTS

Below are the mandatory requirements to include your java package into JCenter.

IF MAVEN PACKAGE TYPE IS .jar, .war, .aar, etc.

  • GroupId and ArtifactId must be unique
  • .jar / .war/ .aar is mandatory
  • maven-metadata.xml is mandatory
  • .pom is mandatory
  • .sources is mandatory

Files optional :

  • .javadocs
  • .md5, .sha256, .sha512
  • .asc

IF MAVEN PACKAGE TYPE IS .pom

  • .pom is mandatory
  • maven-metadata.xml is mandatory

Files optional :

  • .sources
  • .javadocs
  • .asc

--

--