Skip to content

Commit

Permalink
Add build changes to publish github LinkedIn Kafka artifacts to bintr…
Browse files Browse the repository at this point in the history
…ay (#1)

[NOTE] This is a temporary measure to publish artifacts until CI is properly set up to do the job automatically. Users are not expected to run this themselves.
  • Loading branch information
jonlee2 authored Mar 7, 2019
1 parent 00c75e7 commit fc61a21
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,20 @@ to avoid known issues with this configuration.
./gradlew releaseTarGzAll

### Publishing the jar for all version of Scala and for all projects to maven ###
./gradlew uploadArchivesAll
./gradlew -Pversion=<release version> uploadArchivesAll

Please note for this to work you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`) and assign the following variables
By default, this command will publish artifacts to a Bintray repository named "kafka" under an account specified by the BINTRAY_USER environment variable. The BINTRAY_KEY
environment variable is used for the password for that account.

If you want to override this to use a different maven repository, you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`)
and assign the following variables

mavenUrl=
mavenUsername=
mavenPassword=

Signing is disabled by default. If you need signing, please set the following variables in `gradle.properties` as well:

signing.keyId=
signing.password=
signing.secretKeyRingFile=
Expand Down
19 changes: 12 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,15 @@ ext {
skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
shouldSign = !skipSigning && !version.endsWith("SNAPSHOT") && project.gradle.startParameter.taskNames.any { it.contains("upload") }

mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : ''
mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : ''
mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : ''

bintrayUsername = System.getenv('BINTRAY_USER')
bintrayKey=System.getenv('BINTRAY_KEY')
bintrayUrl = bintrayApiBaseUrl + '/maven/' + bintrayUsername + '/' + bintrayRepo + '/' + bintrayPackage + '/;publish=1'

// By default, publish to Bintray.
mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : bintrayUrl
mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : bintrayUsername
mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : bintrayKey

userShowStandardStreams = project.hasProperty("showStandardStreams") ? showStandardStreams : null

userTestLoggingEvents = project.hasProperty("testLoggingEvents") ? Arrays.asList(testLoggingEvents.split(",")) : null
Expand Down Expand Up @@ -177,9 +182,9 @@ subprojects {
afterEvaluate {
pom.artifactId = "${archivesBaseName}"
pom.project {
name 'Apache Kafka'
name 'LinkedIn fork of Apache Kafka'
packaging 'jar'
url 'http://kafka.apache.org'
url 'http://github.com/linkedin/kafka'
licenses {
license {
name 'The Apache Software License, Version 2.0'
Expand Down Expand Up @@ -517,7 +522,7 @@ for ( sv in availableScalaVersions ) {
}

def connectPkgs = ['connect:api', 'connect:runtime', 'connect:transforms', 'connect:json', 'connect:file', 'connect:basic-auth-extension']
def pkgs = ['clients', 'examples', 'log4j-appender', 'tools', 'streams', 'streams:streams-scala', 'streams:test-utils', 'streams:examples'] + connectPkgs
def pkgs = ['clients', 'examples', 'log4j-appender', 'tools', 'streams', 'streams:test-utils', 'streams:examples'] + connectPkgs

/** Create one task per default Scala version */
def withDefScalaVersions(taskName) {
Expand Down
19 changes: 14 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

group=org.apache.kafka
# NOTE: When you change this version number, you should also make sure to update
# the version numbers in
group=com.linkedin.kafka

# NOTE: publishing artifacts requires a property named "version" to be set explicitly. For example,
# ./gradlew -Pversion=<version> uploadArchivesAll
#
# You should also make sure to update the version numbers in
# - tests/kafkatest/__init__.py,
# - tests/kafkatest/version.py (variable DEV_VERSION)
# - kafka-merge-pr.py.
version=2.1.0-SNAPSHOT
# - kafka-merge-pr.py
#
# as necessary.

scalaVersion=2.11.12
task=build
org.gradle.jvmargs=-Xmx1024m -Xss2m
bintrayApiBaseUrl=https://api.bintray.com
bintrayRepo=kafka
bintrayPackage=kafka
skipSigning=true

0 comments on commit fc61a21

Please sign in to comment.