diff --git a/build.gradle b/build.gradle index cb9ed41aa..155a6ba09 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ buildscript { allprojects { group = "com.github.datastream" + version = System.getProperty("projectVersion") apply plugin: 'eclipse' apply plugin: 'idea' diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle index 7b03527fe..c81cccebd 100644 --- a/gradle/buildscript.gradle +++ b/gradle/buildscript.gradle @@ -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' } diff --git a/gradle/maven.gradle b/gradle/maven.gradle index 29ed6afb3..a1fd919fc 100644 --- a/gradle/maven.gradle +++ b/gradle/maven.gradle @@ -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 = 'brooklin-oss@linkedin.com' + 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 } + } }