Commit Graph

182 Commits

Author SHA1 Message Date
Michael Bull 1000c588c0 Add Result#toErrorUnless
Gives us symmetry with the kotlin stdlib:

- https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/take-if.html
- https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/take-unless.html
2020-04-18 11:48:45 +01:00
Michael Bull 22898fff4f Add compiler contract to Result#toErrorIf 2020-04-18 11:43:31 +01:00
Michael Bull 2ef738abcb Add Markus Padourek to contributors 2020-04-18 11:41:25 +01:00
Markus Padourek cf9582075d Add Result#toError
Facilitates transforming an Ok to an Err if the value satisfies a given
prdicate.
2020-04-18 11:39:36 +01:00
Michael Bull 4d2a2d1453 Correct inception year in LICENSE 2020-04-18 11:03:13 +01:00
Michael Bull 3bf934e5cf Update copyright year 2020-04-18 10:55:03 +01:00
Michael Bull 6246bd3137 Update dependencies 2020-04-16 10:37:06 +01:00
Michael Bull 303488f22a Update gradle to 6.3 2020-04-16 10:35:43 +01:00
Michael Bull 6284959f01 Group contributors with developers in POM configuration 2020-02-12 14:55:22 +00:00
Michael Bull a8641c4270 [Gradle Release Plugin] - new version commit: '1.1.7-SNAPSHOT'. 2020-02-12 14:38:26 +00:00
Michael Bull 67b414dbb4 [Gradle Release Plugin] - pre tag commit: '1.1.6'. 2020-02-12 14:38:13 +00:00
Michael Bull 68cabd7a1e Replace bintray with maven central 2020-02-12 14:33:36 +00:00
Michael Bull e4da8cf75f Update gradle to 6.2-rc-2
See: https://discuss.gradle.org/t/unable-to-publish-artifact-to-mavencentral/33727
2020-02-12 14:26:13 +00:00
Michael Bull 7fb76c9865 [Gradle Release Plugin] - new version commit: '1.1.6-SNAPSHOT'. 2020-01-31 09:31:29 +00:00
Michael Bull c170afe13b [Gradle Release Plugin] - pre tag commit: '1.1.5'. 2020-01-31 09:31:10 +00:00
Michael Bull 4ed42cc407 Replace code blocks in comments with variable references 2020-01-31 09:21:41 +00:00
Michael Bull 43ebd5753a Add Rust's mapOr & mapOrElse
See: https://blog.rust-lang.org/2020/01/30/Rust-1.41.0.html#library-changes
2020-01-31 09:17:49 +00:00
Michael Bull 434b8aa7fb Fix typo in Result#unwrap exception message
Fixes #8
2020-01-11 10:14:59 +00:00
Michael Bull 6651b18905 Add kotlin.code.style=official to gradle.properties 2019-12-20 15:19:38 +00:00
Michael Bull 77cda76c26 Update README 2019-12-20 15:08:59 +00:00
Michael Bull 75006939d7 Improve rule specificity in gitignore 2019-12-20 15:08:25 +00:00
Michael Bull 73b094818b [Gradle Release Plugin] - new version commit: '1.1.5-SNAPSHOT'. 2019-12-20 15:01:21 +00:00
Michael Bull f2a32cf811 [Gradle Release Plugin] - pre tag commit: '1.1.4'. 2019-12-20 15:00:58 +00:00
Michael Bull 322f1a5801 Update version in README 2019-12-20 14:58:52 +00:00
Michael Bull 7613668b5e Remove unnecessary parens in root build script 2019-12-20 14:57:53 +00:00
Michael Bull b3dbc36b76 Replace travis with github actions 2019-12-20 14:51:24 +00:00
Michael Bull 4cc5100c1b Update dependencies 2019-12-20 14:47:10 +00:00
Michael Bull 782fac0ced Update dependencies 2019-09-27 10:25:37 +01:00
Michael Bull 1bf2125327 Support destructuring declarations
val (value: String?, error: Throwable?) = runCatching(yourFunction)
2019-09-27 09:29:50 +01:00
Michael Bull ee863c273d [Gradle Release Plugin] - new version commit: '1.1.4-SNAPSHOT'. 2019-08-24 14:43:17 +01:00
Michael Bull b64618016c [Gradle Release Plugin] - pre tag commit: '1.1.3'. 2019-08-24 14:43:05 +01:00
Michael Bull ed430c4eca Update "Creating Results" section in README 2019-08-24 00:31:23 +01:00
Michael Bull 31808eb99c Update dependencies 2019-08-24 00:26:31 +01:00
Michael Bull db00e61542 Update Gradle to 5.6 2019-08-24 00:22:16 +01:00
Michael Bull 586b260683 Deprecate Result.of in favour of runCatching factory function
Matches Kotlin's stdlib and becomes top-level
2019-08-24 00:20:46 +01:00
Michael Bull a8098db1c7 [Gradle Release Plugin] - new version commit: '1.1.3-SNAPSHOT'. 2019-08-09 22:14:19 +01:00
Michael Bull 03d89327f4 [Gradle Release Plugin] - pre tag commit: '1.1.2'. 2019-08-09 22:14:07 +01:00
Michael Bull ebb3dd9255 Use openjdk8 on Travis CI 2019-08-09 21:58:57 +01:00
Michael Bull 66f1122efb Add compiler contracts
See: https://kotlinlang.org/docs/reference/whatsnew13.html#contracts
2019-08-09 21:53:52 +01:00
Michael Bull e609f061ac Update dependencies 2019-08-09 21:12:05 +01:00
Michael Bull a9dee2ebc4 Add missing imports to root project gradle file 2019-06-13 09:03:45 +01:00
Michael Bull ce1110a5cd Provide mavenCentral/jcenter to all projects 2019-06-13 00:19:50 +01:00
Michael Bull 06755ed765 Simplify gradle build file 2019-06-09 13:48:30 +01:00
Michael Bull d1c5bd35e0 Populate more fields in bintray pkg 2019-05-30 13:38:12 +01:00
Michael Bull 745a7ee89b Remove duplicate dokka configuration 2019-05-30 13:37:08 +01:00
Michael Bull 1e487d1468 Replace deprecated gradle configurations 2019-05-30 13:28:56 +01:00
Michael Bull 183ea9a234 Update dependencies 2019-05-30 13:07:51 +01:00
Michael Bull f6776498a5 Update Gradle to 5.4.1 2019-05-30 12:54:24 +01:00
Michael Bull 7e6f4d1104 Use generic identifiers from kotlin stdlib for zip functions 2019-05-30 11:55:11 +01:00
Michael Bull 65b9065164 Inline "when" variable declarations 2019-05-30 11:48:12 +01:00