Skip to content

Instantly share code, notes, and snippets.

@aalmiray
Last active May 4, 2020 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aalmiray/116ef623b29c79ba58dffcce0e341161 to your computer and use it in GitHub Desktop.
Save aalmiray/116ef623b29c79ba58dffcce0e341161 to your computer and use it in GitHub Desktop.
Kordamp settings for publishing to Maven Central via Bintray
plugins {
id 'java-library'
id 'org.kordamp.gradle.java-project' version '0.35.0'
id 'org.kordamp.gradle.bintray' version '0.35.0'
}
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**undefined**'
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**undefined**'
if (!project.hasProperty('sonatypeUsername')) ext.sonatypeUsername = '**undefined**'
if (!project.hasProperty('sonatypePassword')) ext.sonatypePassword = '**undefined**'
config {
release = (rootProject.findProperty('release') ?: false).toBoolean()
info {
name = 'My project'
description = 'My project providews awesome behavior'
vendor = 'Acme'
inceptionYear = '2020'
tags = ['awesome']
links {
website = 'https://github.com/joecool/my-project'
issueTracker = 'https://github.com/joecool/my-project/issues'
scm = 'https://github.com/joecool/my-project.git'
}
credentials {
sonatype {
username = project.sonatypeUsername
password = project.sonatypePassword
}
}
people {
person {
id = 'joecool'
name = 'Joe Cool'
roles = ['developer']
}
}
}
licensing {
licenses {
license {
id = 'Apache-2.0'
}
}
}
bintray {
userOrg = 'joecool'
name = rootProject.name
publish = config.release
credentials {
username = project.bintrayUsername
password = project.bintrayApiKey
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment