Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.novoda:bintray-release:0.9.2'
}
dependencies {
implementation("com.github.novoda:bintray-release:0.9.2")
}
<dependency>
<groupId>com.github.novoda</groupId>
<artifactId>bintray-release</artifactId>
<version>0.9.2</version>
</dependency>
libraryDependencies += "com.github.novoda" % "bintray-release" % "0.9.2"
:dependencies [[com.github.novoda/bintray-release "0.9.2"]]
Super duper easy way to release your Android and other artifacts to bintray.
This is a helper for releasing libraries to bintray. It is intended to help configuring stuff related to maven and bintray. At the moment it works with Android Library projects, plain Java and plain Groovy projects, but our focus is to mainly support Android projects.
To publish a library to bintray using this plugin, add these dependencies to the build.gradle
of the module that will be published:
apply plugin: 'com.novoda.bintray-release' // must be applied after your artifact generating plugin (eg. java / com.android.library)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:<latest-version>'
}
}
Use the publish
closure to set the info of your package:
publish {
userOrg = 'novoda'
groupId = 'com.novoda'
artifactId = 'bintray-release'
publishVersion = '0.6.1'
desc = 'Oh hi, this is a nice description for a project, right?'
website = 'https://github.com/novoda/bintray-release'
}
If you use Kotlin DSL use:
import com.novoda.gradle.release.PublishExtension
configure<PublishExtension> {
userOrg = "novoda"
groupId = "com.novoda"
artifactId = "bintray-release"
publishVersion = "0.6.1"
desc = "Oh hi, this is a nice description for a project, right?"
website = "https://github.com/novoda/bintray-release"
}
Finally, use the task bintrayUpload
to publish (make sure you build the project first!):
$ ./gradlew clean build bintrayUpload -PbintrayUser=BINTRAY_USERNAME -PbintrayKey=BINTRAY_KEY -PdryRun=false
More info on the available properties and other usages in the Github Wiki.
The plugin officially supports only Gradle 4.0+
Snapshot builds from develop
are automatically deployed to a repository that is not synced with JCenter.
To consume a snapshot build add an additional maven repo as follows:
repositories {
maven {
url 'https://dl.bintray.com/novoda-oss/snapshots/'
}
}
You can find the latest snapshot version following this link.
Here are a list of useful links:
support-bintray-release
when posting a new question