From a5d641d42a3fdacad0f0824b18c949f2573d9fd1 Mon Sep 17 00:00:00 2001 From: Lukas Forst Date: Tue, 12 Apr 2022 11:41:16 +0200 Subject: [PATCH] Change package to dev (#18) --- README.md | 42 +++++++++---------- build.gradle.kts | 11 ++--- gradle/wrapper/gradle-wrapper.properties | 2 +- .../forst/katlib/ArrayExtensions.kt | 2 +- .../forst/katlib/BooleanExtensions.kt | 2 +- .../forst/katlib/CryptoExtensions.kt | 2 +- .../forst/katlib/DateExtensions.kt | 2 +- .../forst/katlib/InstantExtensions.kt | 2 +- .../forst/katlib/IterableExtensions.kt | 4 +- .../forst/katlib/JacksonExtensions.kt | 4 +- .../{pw => dev}/forst/katlib/MapExtensions.kt | 2 +- .../forst/katlib/OtherExtensions.kt | 2 +- .../forst/katlib/PairExtensions.kt | 2 +- .../kotlin/{pw => dev}/forst/katlib/Prompt.kt | 2 +- .../forst/katlib/SequenceExtensions.kt | 2 +- .../{pw => dev}/forst/katlib/Services.kt | 2 +- .../{pw => dev}/forst/katlib/SetExtensions.kt | 2 +- .../forst/katlib/StringExtensions.kt | 2 +- .../forst/katlib/ArrayExtensionsTest.kt | 2 +- .../forst/katlib/BooleanExtensionsTest.kt | 2 +- .../forst/katlib/DateExtensionsTest.kt | 2 +- .../forst/katlib/InstantExtensionsTest.kt | 2 +- .../forst/katlib/IterableExtensionsTest.kt | 2 +- .../forst/katlib/MapExtensionsTest.kt | 2 +- .../forst/katlib/OtherExtensionsTest.kt | 3 +- .../forst/katlib/PairExtensionsKtTest.kt | 2 +- .../forst/katlib/SequenceExtensionsTest.kt | 2 +- .../{pw => dev}/forst/katlib/ServicesTest.kt | 2 +- .../forst/katlib/SetExtensionsTest.kt | 2 +- .../forst/katlib/SettableRandom.kt | 2 +- .../forst/katlib/StringExtensionsTest.kt | 2 +- .../forst/katlib/classlevel.properties | 0 32 files changed, 59 insertions(+), 57 deletions(-) rename src/main/kotlin/{pw => dev}/forst/katlib/ArrayExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/BooleanExtensions.kt (94%) rename src/main/kotlin/{pw => dev}/forst/katlib/CryptoExtensions.kt (97%) rename src/main/kotlin/{pw => dev}/forst/katlib/DateExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/InstantExtensions.kt (93%) rename src/main/kotlin/{pw => dev}/forst/katlib/IterableExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/JacksonExtensions.kt (96%) rename src/main/kotlin/{pw => dev}/forst/katlib/MapExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/OtherExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/PairExtensions.kt (98%) rename src/main/kotlin/{pw => dev}/forst/katlib/Prompt.kt (96%) rename src/main/kotlin/{pw => dev}/forst/katlib/SequenceExtensions.kt (99%) rename src/main/kotlin/{pw => dev}/forst/katlib/Services.kt (97%) rename src/main/kotlin/{pw => dev}/forst/katlib/SetExtensions.kt (90%) rename src/main/kotlin/{pw => dev}/forst/katlib/StringExtensions.kt (98%) rename src/test/kotlin/{pw => dev}/forst/katlib/ArrayExtensionsTest.kt (98%) rename src/test/kotlin/{pw => dev}/forst/katlib/BooleanExtensionsTest.kt (95%) rename src/test/kotlin/{pw => dev}/forst/katlib/DateExtensionsTest.kt (99%) rename src/test/kotlin/{pw => dev}/forst/katlib/InstantExtensionsTest.kt (98%) rename src/test/kotlin/{pw => dev}/forst/katlib/IterableExtensionsTest.kt (99%) rename src/test/kotlin/{pw => dev}/forst/katlib/MapExtensionsTest.kt (99%) rename src/test/kotlin/{pw => dev}/forst/katlib/OtherExtensionsTest.kt (98%) rename src/test/kotlin/{pw => dev}/forst/katlib/PairExtensionsKtTest.kt (98%) rename src/test/kotlin/{pw => dev}/forst/katlib/SequenceExtensionsTest.kt (97%) rename src/test/kotlin/{pw => dev}/forst/katlib/ServicesTest.kt (97%) rename src/test/kotlin/{pw => dev}/forst/katlib/SetExtensionsTest.kt (95%) rename src/test/kotlin/{pw => dev}/forst/katlib/SettableRandom.kt (97%) rename src/test/kotlin/{pw => dev}/forst/katlib/StringExtensionsTest.kt (98%) rename src/test/resources/{pw => dev}/forst/katlib/classlevel.properties (100%) diff --git a/README.md b/README.md index f0c921b..0304caf 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ Collection of Kotlin extension functions and utilities. This library does not ha Katlib is available on the Maven Central. Then to import Katlib to Gradle project use: ```Kotlin -implementation("pw.forst", "katlib", "2.1.1") +implementation("dev.forst", "katlib", "2.2.0") ``` Or with Groovy DSL ```groovy -implementation 'pw.forst:katlib:2.1.1' +implementation 'dev.forst:katlib:2.2.0' ``` To import Katlib to Maven project use: @@ -27,7 +27,7 @@ To import Katlib to Maven project use: ```xml - pw.forst + dev.forst katlib 2.1.1 @@ -44,8 +44,8 @@ Feel free to submit PR with your favourite extension functions and other cool ut ## Examples The library contains a lot of useful (as well as useless) extensions and functions that were gathered during my (and my colleges) Kotlin -career. Please see [tests](src/test/kotlin/pw/forst/katlib) folder for all possible functions and how to use them. Full documentation can be -found [here](https://katlib.forst.dev/). +career. Please see [tests](src/test/kotlin/dev/forst/katlib) folder for all possible functions and how to use them. Full documentation can +be found [here](https://katlib.forst.dev/). Please note that some functions seems like duplicates of the standard library - usually it is not like that as they provide similar functionality on different interface. For example there's `List.random` but not `Iterable.random` - random on `Iterable` is then implemented @@ -57,7 +57,7 @@ library in Kotlin 1.4. - so if you find some duplicates, let me know or create P Following functions are the most popular ones. -#### [Iterable Extensions](src/main/kotlin/pw/forst/katlib/IterableExtensions.kt) +#### [Iterable Extensions](src/main/kotlin/dev/forst/katlib/IterableExtensions.kt) * `Iterable.random` - returns the random element from the iterable * `Iterable.reduction` - reduce producing list allowing you to set initial value, useful for cumulative sums @@ -85,26 +85,26 @@ Following functions are the most popular ones. * `Iterable.withEach(action: T.() -> Unit)` - performs the given action with each element as a receiver * `Iterable.withEachIndexed(action: T.(index: Int) -> Unit)` - performs the given action with each element as a receiver, providing sequential index with the element -#### [Map Extensions](src/main/kotlin/pw/forst/katlib/MapExtensions.kt) +#### [Map Extensions](src/main/kotlin/dev/forst/katlib/MapExtensions.kt) * `Map.getWeightedRandom` - randomly selects item with respect to the current weight distribution * `Map.mergeReduce` - two maps together using the given reduce function * `Map.join` - joins two maps together using the given join function * `Map>.swapKeys(): Map>` - swaps keys in two-dimensional maps * there are multiple `swapKeys` implementations for up to three-dimensional maps, just - browse [the code](src/main/kotlin/pw/forst/katlib/MapExtensions.kt) + browse [the code](src/main/kotlin/dev/forst/katlib/MapExtensions.kt) * `Map, V>.toTwoLevelMap(): Map>` - creates two-dimensional map from the map of pairs * `Map, V>.toThreeLevelMap(): Map>>` - creates three-dimensional map from the map of triples * `Map>.getSecondLevelValues(): Set` - collects all the values from the bottom level into set * `Map>>.getThirdLevelValues(): Set` - collects all the values from the bottom level into set * `Iterable>.merge(): Map>` - for each key, merges all the values into one common list -#### [Set Extensions](src/main/kotlin/pw/forst/katlib/SetExtensions.kt) +#### [Set Extensions](src/main/kotlin/dev/forst/katlib/SetExtensions.kt) * `SortedSet.min` - returns minimum of the set or null if empty * `SortedSet.max` - returns maximum of the set or null -#### [Pair Extensions](src/main/kotlin/pw/forst/katlib/PairExtensions.kt) +#### [Pair Extensions](src/main/kotlin/dev/forst/katlib/PairExtensions.kt) * `mapLeft/Right/Pair` - applies given block to left/right/all iterable element/s of the pair @@ -120,14 +120,14 @@ val pair = Pair(10, 20) assertEquals(Pair("10", 20), pair.letLeft { it.toString() }) ``` -#### [Date Extensions](src/main/kotlin/pw/forst/katlib/DateExtensions.kt) +#### [Date Extensions](src/main/kotlin/dev/forst/katlib/DateExtensions.kt) * `getDateRangeTo` - returns list of dates between two `LocalDate` * `getDaysInInterval` - returns number of days between two `LocalDate` (inclusive) * `getDayDifference` - returns number of days between two `LocalDate` (exclusive) * `getWeekOfYear` - returns week of year for given `LocalDate` and optionaly `Locale` -#### [Jackson Extensions](src/main/kotlin/pw/forst/katlib/JacksonExtensions.kt) +#### [Jackson Extensions](src/main/kotlin/dev/forst/katlib/JacksonExtensions.kt) To use these, one must include dependency on Jackson @@ -148,7 +148,7 @@ val obj: MyDataClass? = parseJson(myJson) * `createJsonBytes` - creates JSON in bytes from given object * `prettyPrintJson` - returns pretty printed JSON value as string -#### [Boolean Extensions](src/main/kotlin/pw/forst/katlib/BooleanExtensions.kt) +#### [Boolean Extensions](src/main/kotlin/dev/forst/katlib/BooleanExtensions.kt) `whenTrue` and `whenFalse` - useful extensions mainly used for logging when the oneliners are used. @@ -160,7 +160,7 @@ fun someFunctionIndicatingSuccess(): Boolean = } ``` -#### [String Extensions](src/main/kotlin/pw/forst/katlib/StringExtensions.kt) +#### [String Extensions](src/main/kotlin/dev/forst/katlib/StringExtensions.kt) * `startsWithLetter` - returns true fi string starts with latin letter a-z or A-Z * `restrictLengthWithEllipsis` - shortens the string to given max length, appends ellipsis @@ -171,16 +171,16 @@ assertEquals("ABCD…", "ABCDEFHG".restrictLengthWithEllipsis(5, "...")) * `toUuid` - converts string to UUID -#### [Instant Extensions](src/main/kotlin/pw/forst/katlib/InstantExtensions.kt) +#### [Instant Extensions](src/main/kotlin/dev/forst/katlib/InstantExtensions.kt) * `durationToInMilli` - returns absolute difference between two `Instant` values in milliseconds -#### [Crypto Extensions](src/main/kotlin/pw/forst/katlib/CryptoExtensions.kt) +#### [Crypto Extensions](src/main/kotlin/dev/forst/katlib/CryptoExtensions.kt) * `hashWithSha256` - produces `SHA-256` of given string/file/bytes * `computeMd5` - computes MD5 from given byte array, returns base64 encoded data -#### [Miscellaneous Extensions](src/main/kotlin/pw/forst/katlib/OtherExtensions.kt) +#### [Miscellaneous Extensions](src/main/kotlin/dev/forst/katlib/OtherExtensions.kt) * `Optional.orNull(): T?` - from optional to Kotlin optional * `T.whenNull` - executes block when `this` is null, useful for logging @@ -216,11 +216,11 @@ byteBuffer.applyIf(shouldReadInt) { getInt() } * `newLine` - shortcut for `System.lineSeparator` * `ByteArray.toUuid` - Read ByteArray as two longs and combine the to UUID -#### [Services](src/main/kotlin/pw/forst/katlib/Services.kt) +#### [Services](src/main/kotlin/dev/forst/katlib/Services.kt) * `TemporalProvider` - Interface providing access to current time via `now` method, very useful when mocking -#### [Array Extensions](src/main/kotlin/pw/forst/katlib/ArrayExtensions.kt) +#### [Array Extensions](src/main/kotlin/dev/forst/katlib/ArrayExtensions.kt) * `buildArray(builderAction: MutableList.() -> Unit): Array` - builds a new Array by populating a MutableList using the given builderAction and returning an Array with the same elements * `Array.map(transform: (T) -> R): Array` - Returns an array containing the results of applying the given transform function to each element in the original array @@ -233,6 +233,6 @@ byteBuffer.applyIf(shouldReadInt) { getInt() } * `Array.minus(element: T): Array` - returns an array containing all elements of the original collection without the first occurrence of the given element * `Array.minus(elements: Array): Array` - returns an array containing all elements of the original collection except the elements contained in the given elements array -#### [Prompt](src/main/kotlin/pw/forst/katlib/Prompt.kt) +#### [Prompt](src/main/kotlin/dev/forst/katlib/Prompt.kt) -* `prompt(promptText: String, exceptionHandler: (e: Exception) -> String? = { null }, transform: (input: String) -> R): R` - prompts user and applies transform to input, invokes exceptionHandler if transform threw an Exception, and repeats prompt \ No newline at end of file +* `prompt(promptText: String, exceptionHandler: (e: Exception) -> String? = { null }, transform: (input: String) -> R): R` - prompts user and applies transform to input, invokes exceptionHandler if transform threw an Exception, and repeats prompt diff --git a/build.gradle.kts b/build.gradle.kts index 8d773e6..2f47021 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import java.net.URL plugins { - kotlin("jvm") version "1.6.10" + kotlin("jvm") version "1.6.20" `maven-publish` signing @@ -14,7 +14,7 @@ plugins { id("io.gitlab.arturbosch.detekt") version "1.19.0" } -group = "pw.forst" +group = "dev.forst" base.archivesName.set("katlib") version = (versioning.info?.tag ?: versioning.info?.lastTag ?: versioning.info?.build) ?: "SNAPSHOT" @@ -23,19 +23,20 @@ repositories { } dependencies { - val jacksonVersion = "2.13.1" + val jacksonVersion = "2.13.2" compileOnly("com.fasterxml.jackson.core", "jackson-databind", jacksonVersion) compileOnly("com.fasterxml.jackson.module", "jackson-module-kotlin", jacksonVersion) compileOnly(kotlin("reflect")) + compileOnly(kotlin("stdlib-jdk8")) // testing testImplementation(kotlin("test")) testImplementation(kotlin("test-junit5")) testImplementation(kotlin("stdlib-jdk8")) - testImplementation("io.mockk", "mockk", "1.12.2") // mock framework + testImplementation("io.mockk", "mockk", "1.12.3") // mock framework testImplementation("ch.qos.logback", "logback-classic", "1.2.9") // logging framework for the tests - val junitVersion = "5.8.1" + val junitVersion = "5.8.2" testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion) // junit testing framework testImplementation("org.junit.jupiter", "junit-jupiter-params", junitVersion) // generated parameters for tests diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..41dfb87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/kotlin/pw/forst/katlib/ArrayExtensions.kt b/src/main/kotlin/dev/forst/katlib/ArrayExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/ArrayExtensions.kt rename to src/main/kotlin/dev/forst/katlib/ArrayExtensions.kt index 3e94c6a..df9c2bb 100644 --- a/src/main/kotlin/pw/forst/katlib/ArrayExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/ArrayExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import kotlin.experimental.ExperimentalTypeInference diff --git a/src/main/kotlin/pw/forst/katlib/BooleanExtensions.kt b/src/main/kotlin/dev/forst/katlib/BooleanExtensions.kt similarity index 94% rename from src/main/kotlin/pw/forst/katlib/BooleanExtensions.kt rename to src/main/kotlin/dev/forst/katlib/BooleanExtensions.kt index 4137ccc..bac9954 100644 --- a/src/main/kotlin/pw/forst/katlib/BooleanExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/BooleanExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib /** * Executes [block] iff this (result of previous method) is true. Returns given Boolean. diff --git a/src/main/kotlin/pw/forst/katlib/CryptoExtensions.kt b/src/main/kotlin/dev/forst/katlib/CryptoExtensions.kt similarity index 97% rename from src/main/kotlin/pw/forst/katlib/CryptoExtensions.kt rename to src/main/kotlin/dev/forst/katlib/CryptoExtensions.kt index 8ac580a..98300f7 100644 --- a/src/main/kotlin/pw/forst/katlib/CryptoExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/CryptoExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.io.File import java.security.MessageDigest diff --git a/src/main/kotlin/pw/forst/katlib/DateExtensions.kt b/src/main/kotlin/dev/forst/katlib/DateExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/DateExtensions.kt rename to src/main/kotlin/dev/forst/katlib/DateExtensions.kt index d0370cf..806886d 100644 --- a/src/main/kotlin/pw/forst/katlib/DateExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/DateExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.time.DayOfWeek import java.time.Instant diff --git a/src/main/kotlin/pw/forst/katlib/InstantExtensions.kt b/src/main/kotlin/dev/forst/katlib/InstantExtensions.kt similarity index 93% rename from src/main/kotlin/pw/forst/katlib/InstantExtensions.kt rename to src/main/kotlin/dev/forst/katlib/InstantExtensions.kt index 2c520b6..3ee3a6d 100644 --- a/src/main/kotlin/pw/forst/katlib/InstantExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/InstantExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.time.Instant import kotlin.math.abs diff --git a/src/main/kotlin/pw/forst/katlib/IterableExtensions.kt b/src/main/kotlin/dev/forst/katlib/IterableExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/IterableExtensions.kt rename to src/main/kotlin/dev/forst/katlib/IterableExtensions.kt index 5a0068c..490844e 100644 --- a/src/main/kotlin/pw/forst/katlib/IterableExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/IterableExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.util.NavigableSet @@ -460,7 +460,7 @@ inline fun Iterable.itemsToString( // ---- internal helper functions @PublishedApi -internal val iterableLogger = Logger.getLogger("pw.forst.katlib.IterableExtensions") +internal val iterableLogger = Logger.getLogger("dev.forst.katlib.IterableExtensions") internal const val INT_MAX_POWER_OF_TWO: Int = Int.MAX_VALUE / 2 + 1 /** diff --git a/src/main/kotlin/pw/forst/katlib/JacksonExtensions.kt b/src/main/kotlin/dev/forst/katlib/JacksonExtensions.kt similarity index 96% rename from src/main/kotlin/pw/forst/katlib/JacksonExtensions.kt rename to src/main/kotlin/dev/forst/katlib/JacksonExtensions.kt index 353bd70..c6f3a67 100644 --- a/src/main/kotlin/pw/forst/katlib/JacksonExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/JacksonExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.ObjectMapper @@ -10,7 +10,7 @@ import java.util.logging.Logger * Logger for this file. */ @PublishedApi -internal val jsonLogger = Logger.getLogger("pw.forst.katlib.JacksonExtension") +internal val jsonLogger = Logger.getLogger("dev.forst.katlib.JacksonExtension") /** * Standard [ObjectMapper] configured in a way the platform operates. diff --git a/src/main/kotlin/pw/forst/katlib/MapExtensions.kt b/src/main/kotlin/dev/forst/katlib/MapExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/MapExtensions.kt rename to src/main/kotlin/dev/forst/katlib/MapExtensions.kt index 37735a6..7fea607 100644 --- a/src/main/kotlin/pw/forst/katlib/MapExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/MapExtensions.kt @@ -2,7 +2,7 @@ // the compiler sometimes needs more information about the types -package pw.forst.katlib +package dev.forst.katlib import kotlin.random.Random diff --git a/src/main/kotlin/pw/forst/katlib/OtherExtensions.kt b/src/main/kotlin/dev/forst/katlib/OtherExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/OtherExtensions.kt rename to src/main/kotlin/dev/forst/katlib/OtherExtensions.kt index 65c7e55..bdc2409 100644 --- a/src/main/kotlin/pw/forst/katlib/OtherExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/OtherExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.io.PrintWriter import java.io.StringWriter diff --git a/src/main/kotlin/pw/forst/katlib/PairExtensions.kt b/src/main/kotlin/dev/forst/katlib/PairExtensions.kt similarity index 98% rename from src/main/kotlin/pw/forst/katlib/PairExtensions.kt rename to src/main/kotlin/dev/forst/katlib/PairExtensions.kt index 4c305f5..9f9327f 100644 --- a/src/main/kotlin/pw/forst/katlib/PairExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/PairExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib /** * Applies [block] on left part of pair in List. diff --git a/src/main/kotlin/pw/forst/katlib/Prompt.kt b/src/main/kotlin/dev/forst/katlib/Prompt.kt similarity index 96% rename from src/main/kotlin/pw/forst/katlib/Prompt.kt rename to src/main/kotlin/dev/forst/katlib/Prompt.kt index 78e10a4..93206af 100644 --- a/src/main/kotlin/pw/forst/katlib/Prompt.kt +++ b/src/main/kotlin/dev/forst/katlib/Prompt.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib /** * Prints @param [promptText], reads input from console and applies @param [transform] to it. diff --git a/src/main/kotlin/pw/forst/katlib/SequenceExtensions.kt b/src/main/kotlin/dev/forst/katlib/SequenceExtensions.kt similarity index 99% rename from src/main/kotlin/pw/forst/katlib/SequenceExtensions.kt rename to src/main/kotlin/dev/forst/katlib/SequenceExtensions.kt index ccbbea3..8bc6728 100644 --- a/src/main/kotlin/pw/forst/katlib/SequenceExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/SequenceExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib /** diff --git a/src/main/kotlin/pw/forst/katlib/Services.kt b/src/main/kotlin/dev/forst/katlib/Services.kt similarity index 97% rename from src/main/kotlin/pw/forst/katlib/Services.kt rename to src/main/kotlin/dev/forst/katlib/Services.kt index 30b6606..eef8bcd 100644 --- a/src/main/kotlin/pw/forst/katlib/Services.kt +++ b/src/main/kotlin/dev/forst/katlib/Services.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.time.Instant import java.time.LocalDateTime diff --git a/src/main/kotlin/pw/forst/katlib/SetExtensions.kt b/src/main/kotlin/dev/forst/katlib/SetExtensions.kt similarity index 90% rename from src/main/kotlin/pw/forst/katlib/SetExtensions.kt rename to src/main/kotlin/dev/forst/katlib/SetExtensions.kt index 7c8afc6..ee19ef3 100644 --- a/src/main/kotlin/pw/forst/katlib/SetExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/SetExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.util.SortedSet diff --git a/src/main/kotlin/pw/forst/katlib/StringExtensions.kt b/src/main/kotlin/dev/forst/katlib/StringExtensions.kt similarity index 98% rename from src/main/kotlin/pw/forst/katlib/StringExtensions.kt rename to src/main/kotlin/dev/forst/katlib/StringExtensions.kt index 2049ab1..9af33e7 100644 --- a/src/main/kotlin/pw/forst/katlib/StringExtensions.kt +++ b/src/main/kotlin/dev/forst/katlib/StringExtensions.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import java.net.URL import java.util.UUID diff --git a/src/test/kotlin/pw/forst/katlib/ArrayExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/ArrayExtensionsTest.kt similarity index 98% rename from src/test/kotlin/pw/forst/katlib/ArrayExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/ArrayExtensionsTest.kt index e267e12..b25d8d3 100644 --- a/src/test/kotlin/pw/forst/katlib/ArrayExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/ArrayExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import kotlin.test.Test import kotlin.test.assertContentEquals diff --git a/src/test/kotlin/pw/forst/katlib/BooleanExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/BooleanExtensionsTest.kt similarity index 95% rename from src/test/kotlin/pw/forst/katlib/BooleanExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/BooleanExtensionsTest.kt index 6862d26..497b8ea 100644 --- a/src/test/kotlin/pw/forst/katlib/BooleanExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/BooleanExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import kotlin.test.fail diff --git a/src/test/kotlin/pw/forst/katlib/DateExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/DateExtensionsTest.kt similarity index 99% rename from src/test/kotlin/pw/forst/katlib/DateExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/DateExtensionsTest.kt index ef2b1a4..77306ba 100644 --- a/src/test/kotlin/pw/forst/katlib/DateExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/DateExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import java.time.Instant diff --git a/src/test/kotlin/pw/forst/katlib/InstantExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/InstantExtensionsTest.kt similarity index 98% rename from src/test/kotlin/pw/forst/katlib/InstantExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/InstantExtensionsTest.kt index edd25ce..579bd3f 100644 --- a/src/test/kotlin/pw/forst/katlib/InstantExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/InstantExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import java.time.Instant diff --git a/src/test/kotlin/pw/forst/katlib/IterableExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/IterableExtensionsTest.kt similarity index 99% rename from src/test/kotlin/pw/forst/katlib/IterableExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/IterableExtensionsTest.kt index 0ab8771..8049c26 100644 --- a/src/test/kotlin/pw/forst/katlib/IterableExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/IterableExtensionsTest.kt @@ -1,6 +1,6 @@ @file:Suppress("DEPRECATION") // we want to keep tests even for deprecated code -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import java.util.Locale diff --git a/src/test/kotlin/pw/forst/katlib/MapExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/MapExtensionsTest.kt similarity index 99% rename from src/test/kotlin/pw/forst/katlib/MapExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/MapExtensionsTest.kt index 96fba6b..310e4e7 100644 --- a/src/test/kotlin/pw/forst/katlib/MapExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/MapExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import kotlin.random.Random diff --git a/src/test/kotlin/pw/forst/katlib/OtherExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/OtherExtensionsTest.kt similarity index 98% rename from src/test/kotlin/pw/forst/katlib/OtherExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/OtherExtensionsTest.kt index 1dd4d71..43b8a39 100644 --- a/src/test/kotlin/pw/forst/katlib/OtherExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/OtherExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import java.nio.ByteBuffer @@ -80,6 +80,7 @@ internal class OtherExtensionsTest { fun testAsList() { assertEquals(listOf(1), 1.asList()) val nullable: Int? = null + @Suppress("KotlinConstantConditions") // it's a test, that's ok assertNull(nullable?.asList()) } diff --git a/src/test/kotlin/pw/forst/katlib/PairExtensionsKtTest.kt b/src/test/kotlin/dev/forst/katlib/PairExtensionsKtTest.kt similarity index 98% rename from src/test/kotlin/pw/forst/katlib/PairExtensionsKtTest.kt rename to src/test/kotlin/dev/forst/katlib/PairExtensionsKtTest.kt index 573efca..afc02d1 100644 --- a/src/test/kotlin/pw/forst/katlib/PairExtensionsKtTest.kt +++ b/src/test/kotlin/dev/forst/katlib/PairExtensionsKtTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/pw/forst/katlib/SequenceExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/SequenceExtensionsTest.kt similarity index 97% rename from src/test/kotlin/pw/forst/katlib/SequenceExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/SequenceExtensionsTest.kt index cf8bd34..b4b6c0d 100644 --- a/src/test/kotlin/pw/forst/katlib/SequenceExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/SequenceExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import kotlin.test.assertEquals diff --git a/src/test/kotlin/pw/forst/katlib/ServicesTest.kt b/src/test/kotlin/dev/forst/katlib/ServicesTest.kt similarity index 97% rename from src/test/kotlin/pw/forst/katlib/ServicesTest.kt rename to src/test/kotlin/dev/forst/katlib/ServicesTest.kt index 248eb2e..7e677ef 100644 --- a/src/test/kotlin/pw/forst/katlib/ServicesTest.kt +++ b/src/test/kotlin/dev/forst/katlib/ServicesTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import io.mockk.every import io.mockk.mockk diff --git a/src/test/kotlin/pw/forst/katlib/SetExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/SetExtensionsTest.kt similarity index 95% rename from src/test/kotlin/pw/forst/katlib/SetExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/SetExtensionsTest.kt index 6d49028..84ded89 100644 --- a/src/test/kotlin/pw/forst/katlib/SetExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/SetExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import kotlin.test.assertEquals diff --git a/src/test/kotlin/pw/forst/katlib/SettableRandom.kt b/src/test/kotlin/dev/forst/katlib/SettableRandom.kt similarity index 97% rename from src/test/kotlin/pw/forst/katlib/SettableRandom.kt rename to src/test/kotlin/dev/forst/katlib/SettableRandom.kt index 0d59787..8d66406 100644 --- a/src/test/kotlin/pw/forst/katlib/SettableRandom.kt +++ b/src/test/kotlin/dev/forst/katlib/SettableRandom.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import kotlin.random.Random diff --git a/src/test/kotlin/pw/forst/katlib/StringExtensionsTest.kt b/src/test/kotlin/dev/forst/katlib/StringExtensionsTest.kt similarity index 98% rename from src/test/kotlin/pw/forst/katlib/StringExtensionsTest.kt rename to src/test/kotlin/dev/forst/katlib/StringExtensionsTest.kt index 19d35e7..72aa975 100644 --- a/src/test/kotlin/pw/forst/katlib/StringExtensionsTest.kt +++ b/src/test/kotlin/dev/forst/katlib/StringExtensionsTest.kt @@ -1,4 +1,4 @@ -package pw.forst.katlib +package dev.forst.katlib import org.junit.jupiter.api.Test import java.util.UUID diff --git a/src/test/resources/pw/forst/katlib/classlevel.properties b/src/test/resources/dev/forst/katlib/classlevel.properties similarity index 100% rename from src/test/resources/pw/forst/katlib/classlevel.properties rename to src/test/resources/dev/forst/katlib/classlevel.properties