Skip to content

Commit 5062a7f

Browse files
authored
Add Gradle script for publishing artifacts to Bintray
1 parent bfc3134 commit 5062a7f

File tree

3 files changed

+82
-5
lines changed

3 files changed

+82
-5
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ buildscript {
1212

1313
allprojects {
1414
group = "com.github.datastream"
15+
version = System.getProperty("projectVersion")
1516

1617
apply plugin: 'eclipse'
1718
apply plugin: 'idea'

gradle/buildscript.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ repositories {
1010
dependencies {
1111
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
1212
classpath 'com.linkedin.pegasus:gradle-plugins:3.1.2'
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1314
}

gradle/maven.gradle

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,86 @@
11
subprojects {
2-
apply plugin: 'maven-publish'
2+
apply plugin: 'maven-publish'
3+
apply plugin: 'com.jfrog.bintray'
34

4-
publishing {
5-
publications {
6-
mavenJava(MavenPublication) {
7-
from components.java
5+
task sourcesJar(type: Jar) {
6+
classifier = 'sources'
7+
from sourceSets.main.allJava
8+
}
9+
10+
task javadocJar(type: Jar) {
11+
classifier = 'javadoc'
12+
from javadoc.destinationDir
13+
}
14+
15+
task testJar(type: Jar) {
16+
from sourceSets.test.allJava
17+
classifier = "tests"
18+
}
19+
20+
def projectVersion = System.getProperty("projectVersion")
21+
22+
publishing {
23+
publications {
24+
mavenJava(MavenPublication) {
25+
from components.java
26+
27+
artifact sourcesJar
28+
artifact javadocJar
29+
artifact testJar
30+
31+
version projectVersion
32+
33+
// we strive to meet https://central.sonatype.org/pages/requirements.html
34+
pom {
35+
name = 'Brooklin'
36+
description = 'An extensible distributed system for reliable nearline data streaming at scale'
37+
url = 'https://github.com/linkedin/brooklin'
38+
39+
// Default packaging is jar, so only specify otherwise for non-jars
40+
if (project.pluginManager.hasPlugin('war')) {
41+
packaging = 'war'
42+
}
43+
44+
licenses {
45+
license {
46+
name = 'Copyright 2019 Linkedin, All Rights Reserved'
47+
url = 'https://github.com/linkedin/brooklin/blob/master/LICENSE'
848
}
49+
}
50+
developers {
51+
developer {
52+
name = 'Brooklin Development Team'
53+
email = 'brooklin-oss@linkedin.com'
54+
organization = 'LinkedIn'
55+
organizationUrl = 'linkedin.com'
56+
}
57+
}
58+
scm {
59+
connection = 'scm:git:git://github.com:linkedin/brooklin.git'
60+
developerConnection = 'scm:git:ssh://github.com:linkedin/brooklin.git'
61+
url = 'https://github.com/linkedin/brooklin'
62+
}
963
}
64+
}
65+
}
66+
}
67+
68+
bintray {
69+
user = System.getenv('BINTRAY_USER')
70+
key = System.getenv('BINTRAY_KEY')
71+
publications = ['mavenJava']
72+
pkg {
73+
repo = 'maven'
74+
name = 'brooklin'
75+
userOrg = 'linkedin'
76+
licenses = ['BSD 2-Clause']
77+
vcsUrl = 'https://github.com/linkedin/brooklin'
78+
publicDownloadNumbers = true
79+
version {
80+
name = projectVersion
81+
}
82+
publish = false
83+
override = false
1084
}
85+
}
1186
}

0 commit comments

Comments
 (0)