- create a bintray repository for the project artifact
- Add publishing configuration to your project
- Release a Version
- Approve the new Version in Bintray
- Link Bintray package with JCenter
1. create a bintray repository for the project artifact
We have an organisation on Bintray in order to create newcubator repositories: https://bintray.com/newcubator You can add repositories by clicking the "Add new Repository".
2. Add publishing configuration to your project
Include the following configuration into your build.gradle
plugins {
id 'maven-publish'
id "com.jfrog.bintray" version "1.8.4"
}
//create a maven publication
publishing {
publications {
NameOfYourPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId '<groupId>'
artifactId '<artifactId>'
version project.getVersion()
pom.withXml {
def root = asNode()
root.appendNode('description', '<description of your project>')
root.appendNode('name', '<project name>')
root.appendNode('url', '<project link, e.g. github>')
root.children().last() + pomConfig
}
}
}
}
//configure the bintray release
bintray {
user = System.getenv('BINTRAY_USER') //the ci needs a bintray user and api-key
key = System.getenv('BINTRAY_KEY')
publications = ['NameOfYourPublication']
pkg {
repo = '<name of the bintray repositry>'
name = '<name of the bintray package>'
userOrg = 'newcubator'
licenses = ['MIT']
vcsUrl = 'https://github.com/newcubator/jdbc-excel'
version {
name = project.getVersion()
desc = '<description of your project>'
released = new Date()
vcsTag = project.getVersion()
}
}
}
3. Release a Version
./gradlew bintrayUpload
using Github Actions
https://github.com/newcubator/jdbc-excel/blob/master/.github/workflows/release.yml
using CircleCi
https://github.com/sijakubo/excel-comparison/blob/master/.circleci/config.yml
4. Approve the new Version in Bintray
Whenever you create or upload a new bintray version, you need to Accept the version in the bintray ui. Whenever the Version is accepted, the new Version will be available via Bintray
5. Link Bintray package with JCenter
If you want your Project to be available at JCenter, you need to create a request at jfrog to link your bintray package with a jcenter package. This is done via one button click at the Bintray UI.
A few moments later you will get an email that your request was accepted and your project will be available at jcenter