Skip to content

Instantly share code, notes, and snippets.

@casidiablo
Last active August 29, 2015 14:00
Show Gist options
  • Save casidiablo/11260575 to your computer and use it in GitHub Desktop.
Save casidiablo/11260575 to your computer and use it in GitHub Desktop.
apply plugin: 'bintray'
apply plugin: 'maven-publish'
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
bintray {
user = 'casidiablo'
key = bitrayApiKey
publications = ['mavenJava']
}
tasks.bintrayUpload.dependsOn tasks.publishToMavenLocal

This has to be added anyway:

buildscript {
    repositories {
      jcenter()
    }
    dependencies {
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.3'
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment