-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Gradle script for publishing artifacts to Bintray
- Loading branch information
1 parent
bfc3134
commit 5062a7f
Showing
3 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |