Skip to content

Commit

Permalink
Setup publishing to OSSRH (Maven central) and drop Bintray publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Till Krullmann committed May 8, 2021
1 parent 182a3e6 commit ff2bb2a
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 96 deletions.
63 changes: 63 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
`java-library`
groovy
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}


Expand All @@ -13,10 +15,71 @@ repositories {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

withSourcesJar()
withJavadocJar()
}


dependencies {
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
}


publishing {
publications {
create("mavenJava", MavenPublication::class) {
from(components["java"])
pom {
val githubRepo = providers.gradleProperty("githubRepo")
val githubUrl = githubRepo.map { "https://github.com/$it" }

name.set(providers.gradleProperty("projectName"))
description.set(providers.gradleProperty("projectDescription"))
url.set(providers.gradleProperty("projectUrl"))
licenses {
license {
name.set(providers.gradleProperty("projectLicenseName"))
url.set(providers.gradleProperty("projectLicenseUrl"))
}
}
developers {
developer {
name.set(providers.gradleProperty("developerName"))
email.set(providers.gradleProperty("developerEmail"))
url.set(providers.gradleProperty("developerUrl"))
}
}
scm {
url.set(githubUrl.map { "$it/tree/master" })
connection.set(githubRepo.map { "scm:git:git://github.com/$it.git" })
developerConnection.set(githubRepo.map { "scm:git:ssh://github.com:$it.git" })
}
issueManagement {
url.set(githubUrl.map { "$it/issues" })
system.set("GitHub")
}
}
}
}

repositories {
maven {
name = "local"
url = uri("$buildDir/repos/releases")
}
}
}


signing {
sign(publishing.publications["mavenJava"])
}


nexusPublishing {
repositories {
sonatype()
}
}
20 changes: 6 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
group=org.unbroken-dome.base62
version=1.0.0

friendly_name=Base62
description=A library for encoding and decoding Base-62
home_url=https://github.com/unbroken-dome/base62
projectName=Base62
projectDescription=A library for encoding and decoding Base-62
projectUrl=https://github.com/unbroken-dome/base62
projectLicenseName=The MIT License (MIT)
projectLicenseUrl=https://mit-license.org

scm_url=https://github.com/unbroken-dome/base62.git
issues_url=https://github.com/unbroken-dome/base62/issues

license_name=The MIT License (MIT)
license_url=http://opensource.org/licenses/MIT

bintray_user=
bintray_key=
bintray_labels=base62
bintray_repo=tools
bintray_dryrun=false
githubRepo=unbroken-dome/base62
82 changes: 0 additions & 82 deletions gradle/publishing.gradle

This file was deleted.

0 comments on commit ff2bb2a

Please sign in to comment.