Replace bintray with maven central
This commit is contained in:
parent
e4da8cf75f
commit
68cabd7a1e
@ -1,6 +1,6 @@
|
|||||||
# kotlin-result
|
# kotlin-result
|
||||||
|
|
||||||
[![Release](https://api.bintray.com/packages/michaelbull/maven/kotlin-result/images/download.svg)](https://bintray.com/michaelbull/maven/kotlin-result/_latestVersion) [![CI Status](https://github.com/michaelbull/kotlin-result/workflows/ci/badge.svg)](https://github.com/michaelbull/kotlin-result/actions?query=workflow%3Aci) [![License](https://img.shields.io/github/license/michaelbull/kotlin-result.svg)](https://github.com/michaelbull/kotlin-result/blob/master/LICENSE)
|
[![Maven Central](https://img.shields.io/maven-central/v/com.michael-bull.kotlin-result/kotlin-result.svg)](https://search.maven.org/search?q=g:com.michael-bull.kotlin-result) [![CI Status](https://github.com/michaelbull/kotlin-result/workflows/ci/badge.svg)](https://github.com/michaelbull/kotlin-result/actions?query=workflow%3Aci) [![License](https://img.shields.io/github/license/michaelbull/kotlin-result.svg)](https://github.com/michaelbull/kotlin-result/blob/master/LICENSE)
|
||||||
|
|
||||||
[`Result<V, E>`][result] is a monad for modelling success ([`Ok`][result-ok]) or
|
[`Result<V, E>`][result] is a monad for modelling success ([`Ok`][result-ok]) or
|
||||||
failure ([`Err`][result-err]) operations.
|
failure ([`Err`][result-err]) operations.
|
||||||
@ -9,11 +9,11 @@ failure ([`Err`][result-err]) operations.
|
|||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
repositories {
|
repositories {
|
||||||
maven { url = 'https://dl.bintray.com/michaelbull/maven' }
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.michael-bull.kotlin-result:kotlin-result:1.1.4'
|
implementation("com.michael-bull.kotlin-result:kotlin-result:1.1.6")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
108
build.gradle.kts
108
build.gradle.kts
@ -1,25 +1,18 @@
|
|||||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||||
import com.jfrog.bintray.gradle.BintrayExtension
|
|
||||||
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
|
|
||||||
import org.jetbrains.dokka.gradle.DokkaTask
|
import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
val ossrhUsername: String? by ext
|
||||||
|
val ossrhPassword: String? by ext
|
||||||
|
|
||||||
description = "A Result monad for modelling success or failure operations."
|
description = "A Result monad for modelling success or failure operations."
|
||||||
|
|
||||||
val SourceSet.kotlin: SourceDirectorySet
|
|
||||||
get() = withConvention(KotlinSourceSet::class) { kotlin }
|
|
||||||
|
|
||||||
fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit) {
|
|
||||||
pkg(delegateClosureOf(configure))
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
|
signing
|
||||||
kotlin("jvm") version "1.3.61"
|
kotlin("jvm") version "1.3.61"
|
||||||
id("org.jetbrains.dokka") version "0.10.0"
|
id("org.jetbrains.dokka") version "0.10.1"
|
||||||
id("com.github.ben-manes.versions") version "0.27.0"
|
id("com.github.ben-manes.versions") version "0.27.0"
|
||||||
id("com.jfrog.bintray") version "1.8.4"
|
|
||||||
id("net.researchgate.release") version "2.8.1"
|
id("net.researchgate.release") version "2.8.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,42 +68,79 @@ val sourcesJar by tasks.registering(Jar::class) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
if (project.version.toString().endsWith("SNAPSHOT")) {
|
||||||
|
setUrl("https://oss.sonatype.org/content/repositories/snapshots")
|
||||||
|
} else {
|
||||||
|
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2")
|
||||||
|
}
|
||||||
|
|
||||||
|
credentials {
|
||||||
|
username = ossrhUsername
|
||||||
|
password = ossrhPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
register("mavenJava", MavenPublication::class) {
|
register("mavenJava", MavenPublication::class) {
|
||||||
from(components["java"])
|
from(components["java"])
|
||||||
artifact(javadocJar.get())
|
artifact(javadocJar.get())
|
||||||
artifact(sourcesJar.get())
|
artifact(sourcesJar.get())
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name.set(project.name)
|
||||||
|
description.set(project.description)
|
||||||
|
url.set("https://github.com/michaelbull/kotlin-result")
|
||||||
|
inceptionYear.set("2017")
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("ISC License")
|
||||||
|
url.set("https://opensource.org/licenses/isc-license.txt")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
name.set("Michael Bull")
|
||||||
|
url.set("https://www.michael-bull.com")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scm {
|
||||||
|
connection.set("scm:git:https://github.com/michaelbull/kotlin-result")
|
||||||
|
developerConnection.set("scm:git:git@github.com:michaelbull/kotlin-result.git")
|
||||||
|
url.set("https://github.com/michaelbull/kotlin-result")
|
||||||
|
}
|
||||||
|
|
||||||
|
issueManagement {
|
||||||
|
system.set("GitHub")
|
||||||
|
url.set("https://github.com/michaelbull/kotlin-result/issues")
|
||||||
|
}
|
||||||
|
|
||||||
|
ciManagement {
|
||||||
|
system.set("GitHub")
|
||||||
|
url.set("https://github.com/michaelbull/kotlin-result/actions?query=workflow%3Aci")
|
||||||
|
}
|
||||||
|
|
||||||
|
contributors {
|
||||||
|
contributor {
|
||||||
|
name.set("Kevin Herron")
|
||||||
|
url.set("https://github.com/kevinherron")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val bintrayUser: String? by project
|
signing {
|
||||||
val bintrayKey: String? by project
|
useGpgCmd()
|
||||||
|
sign(publishing.publications)
|
||||||
bintray {
|
|
||||||
user = bintrayUser
|
|
||||||
key = bintrayKey
|
|
||||||
setPublications("mavenJava")
|
|
||||||
|
|
||||||
pkg {
|
|
||||||
repo = "maven"
|
|
||||||
name = project.name
|
|
||||||
desc = project.description
|
|
||||||
websiteUrl = "https://github.com/michaelbull/kotlin-result"
|
|
||||||
issueTrackerUrl = "https://github.com/michaelbull/kotlin-result/issues"
|
|
||||||
vcsUrl = "git@github.com:michaelbull/kotlin-result.git"
|
|
||||||
githubRepo = "michaelbull/kotlin-result"
|
|
||||||
setLicenses("ISC")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val bintrayUpload by tasks.existing(BintrayUploadTask::class) {
|
tasks.afterReleaseBuild {
|
||||||
dependsOn("build")
|
dependsOn(tasks.publish)
|
||||||
dependsOn("generatePomFileForMavenJavaPublication")
|
|
||||||
dependsOn(sourcesJar)
|
|
||||||
dependsOn(javadocJar)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named("afterReleaseBuild") {
|
|
||||||
dependsOn(bintrayUpload)
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user