A super duper easy way to release your Android and Java artifacts to Bintray.
This is a helper for releasing Android and Java libraries to Bintray. Basically it is just a wrapper around the Gradle-Bintray-Plugin and the AndroidArtifacts plugin.
Put the following lines to your project build.gradle
:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
// The current version can be found here https://git.io/fNUnx
classpath "guru.stefma.bintrayrelease:bintrayrelease:$bintrayReleaseVersion"
}
}
For the `master-SNAPSHOT` version click here
buildscript {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
dependencies {
classpath "com.github.stefma:bintray-release:master-SNAPSHOT"
}
}
Please note that this may be fail for the first attempts because JitPack build the plugin on the fly. Please just try it again after some minutes until JitPack have build the plugin.
It can also happen that your current master-SNAPSHOT
is locally outdated.
If so just run ./gradlew --refresh-dependencies
.
This will force Gradle to update all dependencies and plugins.
Because the plugin depends heavily on the AndroidArtifacts plugin we have to setup two extensions.
The androidArtifact
(resp. javaArtifact
) and the publish
extension which needs to be configured
in your module build.gradle
:
apply plugin: "com.android.library" // 1
apply plugin: "guru.stefma.bintrayrelease"
version = "1.0.0"
group = "guru.stefma.bintrayrelease"
androidArtifact { // 2
artifactId = "bintrayrelease"
}
publish {
userOrg = 'stefma'
desc = 'Oh hi, this is a nice description for a project, right?'
website = 'https://github.com/stefma/bintray-release'
}
- //1: Could be either of the following plugins:
com.android.library
,java-library
,org.jetbrains.kotlin.jvm
,kotlin
- //2: This is the extension from the AndroidArtifacts plugin. Take a look into the README there for more options.
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
This is a fork of the original bintray-release
of novoda.
I started to create and maintain this fork (instead of contribute there) because I wanted to have the "full control" over the project.
Beside of this this fork use another Plugin as dependency which I've developed by myself. To keep it regularly in sync with
the "upstream Plugin" I thought it is easy to have a Plugin which is owned by me.
Because it is a fork of the bintray-release
(which is original licensed under the Apache-2
) I decided to license these
Plugin under the Apache-2 as well.
I don't want to violence the Apache-2. But I'm also not a lawyer. Because of this - and the lack of knowledge - I decided to keep novoda inside the LICENSE.
But not all code in this Plugin is original "novoda code". I started the fork at the commit 0d998ad
.
Feel free to compare the latest version with the commit to see a diff about "what is new and what is original novoda software".