From 690baa044e8d641db7538ae5e5385bfcf29b1bc9 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Mon, 6 Jul 2020 22:35:18 +0200 Subject: [PATCH] v0.15.1 --- .travis.yml | 2 +- README.md | 40 ++++++++++++++++++++-------------------- build.gradle | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d736ec..9a533b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ script: - | if [ "$TRAVIS_TEST_RESULT" == 0 ] && [ "$TRAVIS_JDK_VERSION" == openjdk11 ]; then sonar-scanner \ - -Dsonar.projectVersion=0.16.0-SNAPSHOT \ + -Dsonar.projectVersion=0.15.1 \ -Dsonar.projectKey=robstoll_kbox \ -Dsonar.kotlin.detekt.reportPaths=build/reports/detekt/detekt.xml \ -Dsonar.sources="\ diff --git a/README.md b/README.md index a589db3..74000d8 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,63 @@ - + - + # KBox KBox is a very small but useful utility library for Kotlin (JVM, Android and JS). Current extension functions: -- [`Array/List/Iterable/Sequence.appendtoStringBuilder`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/appendToString.kt#L37) +- [`Array/List/Iterable/Sequence.appendtoStringBuilder`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/appendToString.kt#L37) with the ability to define a different separator for the last separation => handy if you want to form sentences like `a, b and c` -- [`CharSequence.blankToNull`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/blanktoNull.kt#L7) +- [`CharSequence.blankToNull`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/blanktoNull.kt#L7) returns the same `CharSequence` if not blank, `null` otherwise -- [`forEachIn(Array/Iterable/Sequence, Array/Iterable/Sequence, ..., action: (E) -> Unit)`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/forEachIn.kt#L6) +- [`forEachIn(Array/Iterable/Sequence, Array/Iterable/Sequence, ..., action: (E) -> Unit)`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/forEachIn.kt#L6) applies the given action to each entry in the given `Iterable`s. -- [` forElementAndEachIn(E, Array/Iterable/Sequence, action: (E) -> Unit)`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/forThisAndForEach.kt#L6) +- [` forElementAndEachIn(E, Array/Iterable/Sequence, action: (E) -> Unit)`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/forThisAndForEach.kt#L6) applies the given action to `this` and each entry in Iterable -- [`Iterable.forEachRemaining()`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/forEachRemaining.kt#L9) +- [`Iterable.forEachRemaining()`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/forEachRemaining.kt#L9) shortcut for `while(hasNext()) yourLambda(next())` -- [Array/List.ifWithinBound](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/ifWithinBound.kt#L13) +- [Array/List.ifWithinBound](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/ifWithinBound.kt#L13) shortcut for `if(index < size){ thenBlock() } else { elseBlock() }` -- [Charsequence?.isNotNullAndNotEmpty/isNotNullAndNotBlank](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/isNotNullAndNot.kt#L6) +- [Charsequence?.isNotNullAndNotEmpty/isNotNullAndNotBlank](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/isNotNullAndNot.kt#L6) -- [`Array/List/Iterable/Sequence.joinToString`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/joinToString.kt#L31) +- [`Array/List/Iterable/Sequence.joinToString`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/joinToString.kt#L31) with the ability to define a different separator for the last separation => handy if you want to form sentences like `a, b and c` -- [`Map.mapParents`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapParents.kt#L13) +- [`Map.mapParents`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapParents.kt#L13) maps child-parent relations. -- [`Iterator.mapRemaining/mapRemainingWithCounter`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapRemaining.kt#L9) +- [`Iterator.mapRemaining/mapRemainingWithCounter`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapRemaining.kt#L9) maps remaining entries with the help of a transform function (where `mapRemainingWithCounter` passes a counter variable to the transform function). -- [`Array/Iterable/Sequence.mapWithIndex`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapWithIndex.kt#L11) +- [`Array/Iterable/Sequence.mapWithIndex`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/mapWithIndex.kt#L11) -- [`Iterator.toPeekingIterator()`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/PeekingIteratorUnsynchronized.kt) +- [`Iterator.toPeekingIterator()`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/PeekingIteratorUnsynchronized.kt) which allows to have a look what the next element is without consuming it. -- [`varargsToList/glue`](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/varargToList.kt#L11) +- [`varargsToList/glue`](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/varargToList.kt#L11) creates a `List` out of a single `E` and an `Array`. Moreover, the following function might come in handy for you as well: -- [identity](https://github.com/robstoll/kbox/tree/master/kbox-common/src/main/kotlin/ch/tutteli/kbox/identity.kt) +- [identity](https://github.com/robstoll/kbox/tree/v0.15.1/kbox-common/src/main/kotlin/ch/tutteli/kbox/identity.kt) # Installation @@ -67,7 +67,7 @@ Following an example if you use gradle and jcenter: ``` repositories { jcenter() } dependencies { - implementation 'ch.tutteli.kbox:kbox:0.15.0' + implementation 'ch.tutteli.kbox:kbox:0.15.1' } ``` diff --git a/build.gradle b/build.gradle index 648aeb1..b96f830 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -version = "0.16.0-SNAPSHOT" +version = "0.15.1" group = 'ch.tutteli.kbox' buildscript {