Skip to content

Commit

Permalink
Add Gradle script for publishing artifacts to Bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedahamid authored Jul 14, 2019
1 parent bfc3134 commit 5062a7f
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 5 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildscript {

allprojects {
group = "com.github.datastream"
version = System.getProperty("projectVersion")

apply plugin: 'eclipse'
apply plugin: 'idea'
Expand Down
1 change: 1 addition & 0 deletions gradle/buildscript.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ repositories {
dependencies {
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
classpath 'com.linkedin.pegasus:gradle-plugins:3.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
85 changes: 80 additions & 5 deletions gradle/maven.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,86 @@
subprojects {
apply plugin: 'maven-publish'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc.destinationDir
}

task testJar(type: Jar) {
from sourceSets.test.allJava
classifier = "tests"
}

def projectVersion = System.getProperty("projectVersion")

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

artifact sourcesJar
artifact javadocJar
artifact testJar

version projectVersion

// we strive to meet https://central.sonatype.org/pages/requirements.html
pom {
name = 'Brooklin'
description = 'An extensible distributed system for reliable nearline data streaming at scale'
url = 'https://github.com/linkedin/brooklin'

// Default packaging is jar, so only specify otherwise for non-jars
if (project.pluginManager.hasPlugin('war')) {
packaging = 'war'
}

licenses {
license {
name = 'Copyright 2019 Linkedin, All Rights Reserved'
url = 'https://github.com/linkedin/brooklin/blob/master/LICENSE'
}
}
developers {
developer {
name = 'Brooklin Development Team'
email = '[email protected]'
organization = 'LinkedIn'
organizationUrl = 'linkedin.com'
}
}
scm {
connection = 'scm:git:git://github.com:linkedin/brooklin.git'
developerConnection = 'scm:git:ssh://github.com:linkedin/brooklin.git'
url = 'https://github.com/linkedin/brooklin'
}
}
}
}
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenJava']
pkg {
repo = 'maven'
name = 'brooklin'
userOrg = 'linkedin'
licenses = ['BSD 2-Clause']
vcsUrl = 'https://github.com/linkedin/brooklin'
publicDownloadNumbers = true
version {
name = projectVersion
}
publish = false
override = false
}
}
}

0 comments on commit 5062a7f

Please sign in to comment.