Move to new package name
This commit is contained in:
parent
da77504fa7
commit
bf3aaee77b
11
README.md
11
README.md
@ -1,5 +1,7 @@
|
||||
# kotlin-result
|
||||
|
||||
[![Release](https://jitpack.io/v/com.github.michaelbull/kotlin-result.svg)](https://jitpack.io/#com.github.michaelbull/kotlin-result) [![Build Status](https://travis-ci.org/michaelbull/kotlin-result.svg?branch=master)](https://travis-ci.org/michaelbull/kotlin-result) [![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
|
||||
failure ([`Error`][result-error]) operations.
|
||||
|
||||
@ -36,16 +38,13 @@ Improvements on the existing solutions include:
|
||||
|
||||
## Installation
|
||||
|
||||
This project is available in the [Maven Central Repository][maven-central]
|
||||
repository. The artifacts are signed with my personal [GPG key][gpg].
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.mikebull94.kotlin-result:kotlin-result:1.0.0'
|
||||
compile 'com.github.michaelbull:kotlin-result:1.0.0'
|
||||
}
|
||||
```
|
||||
|
||||
@ -72,8 +71,6 @@ This project is available under the terms of the ISC license. See the
|
||||
[result]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L10
|
||||
[result-ok]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L15
|
||||
[result-error]: https://github.com/michaelbull/kotlin-result/blob/master/src/main/kotlin/com/mikebull94/result/Result.kt#L31
|
||||
[maven-central]: http://search.maven.org/
|
||||
[gpg]:https://www.michael-bull.com/gpg.asc
|
||||
[unit-tests]: https://github.com/michaelbull/kotlin-result/tree/master/src/test/kotlin/com/mikebull94/result
|
||||
[wiki]: https://github.com/michaelbull/kotlin-result/wiki
|
||||
[wiki-elm]: https://github.com/michaelbull/kotlin-result/wiki/Elm
|
||||
|
17
build.gradle
17
build.gradle
@ -12,15 +12,11 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
gradleDir = "$rootDir/gradle"
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'org.jetbrains.dokka'
|
||||
apply plugin: 'org.junit.platform.gradle.plugin'
|
||||
apply plugin: 'net.researchgate.release'
|
||||
apply from: "$gradleDir/publish.gradle"
|
||||
|
||||
description = 'A Result monad for modelling success or failure operations.'
|
||||
|
||||
@ -63,7 +59,12 @@ task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact javadocJar
|
||||
artifact sourcesJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
group=com.mikebull94.kotlin-result
|
||||
version=1.0.0-SNAPSHOT
|
||||
group=com.github.michaelbull.kotlin-result
|
||||
version=0.0.0-SNAPSHOT
|
||||
|
||||
dokkaVersion=0.9.15
|
||||
gradleReleaseVersion=2.6.0
|
||||
|
@ -1,67 +0,0 @@
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'signing'
|
||||
|
||||
ext.isSnapshot = version.endsWith('-SNAPSHOT')
|
||||
ext.isCI = System.getenv('CI') != null
|
||||
|
||||
if (!isCI) {
|
||||
signing {
|
||||
sign configurations.archives
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
if (isSnapshot || isCI) {
|
||||
repository(url: "file://~/.m2/repository")
|
||||
} else {
|
||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||
|
||||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||
}
|
||||
|
||||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.tasks.afterReleaseBuild.dependsOn tasks.uploadArchives
|
||||
|
||||
afterEvaluate {
|
||||
tasks.uploadArchives.repositories.mavenDeployer.pom.project {
|
||||
groupId = project.group
|
||||
artifactId = project.name
|
||||
version = project.version
|
||||
packaging = 'jar'
|
||||
|
||||
name = project.name
|
||||
description = project.description
|
||||
inceptionYear = 2017
|
||||
url = 'https://github.com/michaelbull/kotlin-result'
|
||||
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/michaelbull/kotlin-result'
|
||||
developerConnection = 'scm:git:git@github.com:michaelbull/kotlin-result.git'
|
||||
url = 'https://github.com/michaelbull/kotlin-result'
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = 'ISC License'
|
||||
url = 'http://opensource.org/licenses/isc-license.txt'
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
name = 'Michael Bull'
|
||||
url = 'https://www.michael-bull.com'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* - Rust: [Result.and](https://doc.rust-lang.org/std/result/enum.Result.html#method.and)
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* - Elm: [Result.toMaybe](http://package.elm-lang.org/packages/elm-lang/core/latest/Result#toMaybe)
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from left to right to
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* Maps a [Result<V, E>][Result] to [Result<U, E>][Result] by applying a function to a contained
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* Calls a [callback] if the [Result] is [Ok].
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* - Rust: [Result.or](https://doc.rust-lang.org/std/result/enum.Result.html#method.or)
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* [Result] is a type that represents either success ([Ok]) or failure ([Error]).
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
/**
|
||||
* Creates an [Iterator] over the possibly contained [value][Ok.value].
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
class UnwrapException(message: String) : Exception(message)
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.Matcher
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.Matcher
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
@ -1,4 +1,4 @@
|
||||
package com.mikebull94.result
|
||||
package com.github.michaelbull.result
|
||||
|
||||
import com.natpryce.hamkrest.assertion.assertThat
|
||||
import com.natpryce.hamkrest.equalTo
|
Loading…
Reference in New Issue
Block a user