diff --git a/build.gradle.kts b/build.gradle.kts index 97640b8..4a3ce8d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ buildscript { } group = "ru.landgrafhomyak.utility" -version = "1.0" +version = "0" repositories { mavenCentral() diff --git a/settings.gradle.kts b/settings.gradle.kts index 3cd8b2e..00da3ad 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,3 @@ -rootProject.name = "closeable-state" +rootProject.name = "closeable-state-1" includeBuild("./highlevel-try-finally") \ No newline at end of file diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ChildCloseableState.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ChildCloseableState.kt similarity index 97% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ChildCloseableState.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ChildCloseableState.kt index 1e9b666..0738fd2 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ChildCloseableState.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ChildCloseableState.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.jvm.JvmField diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/CloseableState.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/CloseableState.kt similarity index 90% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/CloseableState.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/CloseableState.kt index 151614e..646c443 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/CloseableState.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/CloseableState.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 public interface CloseableState : AutoCloseable { public fun throwClosed(): Nothing diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessState.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessState.kt similarity index 87% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessState.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessState.kt index 10d7e57..8b166bb 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessState.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessState.kt @@ -1,8 +1,8 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 -import ru.landgrafhomyak.utility.closeable_state.internal.compareAndExchange -import ru.landgrafhomyak.utility.closeable_state.internal.get -import ru.landgrafhomyak.utility.closeable_state.internal.newAtomicRef +import ru.landgrafhomyak.utility.closeable_state_1.internal.compareAndExchange +import ru.landgrafhomyak.utility.closeable_state_1.internal.get +import ru.landgrafhomyak.utility.closeable_state_1.internal.newAtomicRef public open class ErrorOnConcurrentAccessState : CloseableState.ExternallySynchronized { private enum class State { diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ManualStateManipulation.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ManualStateManipulation.kt similarity index 76% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ManualStateManipulation.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ManualStateManipulation.kt index 5a3e0ba..cd60fe0 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/ManualStateManipulation.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ManualStateManipulation.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 @RequiresOptIn( message = "Manual state control is unsafe, are you sure to do this", diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedErrorOnConcurrentAccesState.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedErrorOnConcurrentAccesState.kt similarity index 93% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedErrorOnConcurrentAccesState.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedErrorOnConcurrentAccesState.kt index d982d97..1f8639d 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedErrorOnConcurrentAccesState.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedErrorOnConcurrentAccesState.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalContracts::class) -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.contracts.ExperimentalContracts diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedUsagesCounter.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedUsagesCounter.kt similarity index 92% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedUsagesCounter.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedUsagesCounter.kt index ad66a2a..d320447 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/OwnedUsagesCounter.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/OwnedUsagesCounter.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalContracts::class) -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.contracts.ExperimentalContracts diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounter.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounter.kt similarity index 75% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounter.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounter.kt index 0b7fb23..cfdaee2 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounter.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounter.kt @@ -1,14 +1,14 @@ @file:OptIn(ExperimentalContracts::class) -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.contracts.ExperimentalContracts -import ru.landgrafhomyak.utility.closeable_state.internal.AtomicLong -import ru.landgrafhomyak.utility.closeable_state.internal.Misc -import ru.landgrafhomyak.utility.closeable_state.internal.compareAndExchange -import ru.landgrafhomyak.utility.closeable_state.internal.get -import ru.landgrafhomyak.utility.closeable_state.internal.newAtomicLong -import ru.landgrafhomyak.utility.closeable_state.internal.update +import ru.landgrafhomyak.utility.closeable_state_1.internal.AtomicLong +import ru.landgrafhomyak.utility.closeable_state_1.internal.Misc +import ru.landgrafhomyak.utility.closeable_state_1.internal.compareAndExchange +import ru.landgrafhomyak.utility.closeable_state_1.internal.get +import ru.landgrafhomyak.utility.closeable_state_1.internal.newAtomicLong +import ru.landgrafhomyak.utility.closeable_state_1.internal.update public open class UsagesCounter : CloseableState.AllowsConcurrency { private val _value: AtomicLong = newAtomicLong(0L) diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/children_scopes.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/children_scopes.kt similarity index 96% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/children_scopes.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/children_scopes.kt index d713473..20aefe4 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/children_scopes.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/children_scopes.kt @@ -1,6 +1,6 @@ @file:JvmName("ChildrenScopesKt") -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/Misc.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/Misc.kt similarity index 90% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/Misc.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/Misc.kt index 8400ad8..156f295 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/Misc.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/Misc.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state.internal +package ru.landgrafhomyak.utility.closeable_state_1.internal import kotlin.jvm.JvmStatic diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt similarity index 94% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt index abb02c6..07d1081 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt @@ -1,6 +1,6 @@ @file:JvmName("AtomicsKt") -package ru.landgrafhomyak.utility.closeable_state.internal +package ru.landgrafhomyak.utility.closeable_state_1.internal import kotlin.jvm.JvmName diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/usage_scopes.kt b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/usage_scopes.kt similarity index 95% rename from src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/usage_scopes.kt rename to src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/usage_scopes.kt index 19e52fb..8f629f8 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state/usage_scopes.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/usage_scopes.kt @@ -1,6 +1,6 @@ @file:JvmName("UsageScopesKt") -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessStateTest.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessStateTest.kt similarity index 81% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessStateTest.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessStateTest.kt index b4aad98..6643950 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/ErrorOnConcurrentAccessStateTest.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/ErrorOnConcurrentAccessStateTest.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.test.Test diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/TestThrowable.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/TestThrowable.kt similarity index 66% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/TestThrowable.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/TestThrowable.kt index 7269b52..49ccde2 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/TestThrowable.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/TestThrowable.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 internal class TestThrowable: Throwable("If this throwable isn't caught then test is bad written") { } \ No newline at end of file diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounterTest.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounterTest.kt similarity index 79% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounterTest.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounterTest.kt index bd7050d..17f5b62 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/UsagesCounterTest.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/UsagesCounterTest.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.test.Test diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAbstractTestSet.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAbstractTestSet.kt similarity index 96% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAbstractTestSet.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAbstractTestSet.kt index 7e37436..b095a1d 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAbstractTestSet.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAbstractTestSet.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.test.Test diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAllowsConcurrencyAbstractTestSet.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAllowsConcurrencyAbstractTestSet.kt similarity index 90% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAllowsConcurrencyAbstractTestSet.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAllowsConcurrencyAbstractTestSet.kt index 6db25f1..4492b39 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateAllowsConcurrencyAbstractTestSet.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateAllowsConcurrencyAbstractTestSet.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.test.Test diff --git a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateExternallySynchronizedAbstractTestSet.kt b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateExternallySynchronizedAbstractTestSet.kt similarity index 91% rename from src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateExternallySynchronizedAbstractTestSet.kt rename to src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateExternallySynchronizedAbstractTestSet.kt index 94d54a3..eede368 100644 --- a/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state/_CloseableStateExternallySynchronizedAbstractTestSet.kt +++ b/src/commonTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/_CloseableStateExternallySynchronizedAbstractTestSet.kt @@ -1,4 +1,4 @@ -package ru.landgrafhomyak.utility.closeable_state +package ru.landgrafhomyak.utility.closeable_state_1 import kotlin.test.Test diff --git a/src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt b/src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt similarity index 98% rename from src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt rename to src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt index 30fe646..447a416 100644 --- a/src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt +++ b/src/jvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt @@ -1,7 +1,7 @@ @file:Suppress("USELESS_CAST", "NOTHING_TO_INLINE") @file:JvmName("AtomicsKt") -package ru.landgrafhomyak.utility.closeable_state.internal +package ru.landgrafhomyak.utility.closeable_state_1.internal import java.util.concurrent.atomic.AtomicLong as jAtomicLong import java.util.concurrent.atomic.AtomicReference as jAtomicReference diff --git a/src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state/tests/KotlinStdlibDependencyTest.kt b/src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/tests/KotlinStdlibDependencyTest.kt similarity index 88% rename from src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state/tests/KotlinStdlibDependencyTest.kt rename to src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/tests/KotlinStdlibDependencyTest.kt index d3a060f..e9a3b2e 100644 --- a/src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state/tests/KotlinStdlibDependencyTest.kt +++ b/src/jvmTest/kotlin/ru/landgrafhomyak/utility/closeable_state_1/tests/KotlinStdlibDependencyTest.kt @@ -1,10 +1,10 @@ -package ru.landgrafhomyak.utility.closeable_state.tests +package ru.landgrafhomyak.utility.closeable_state_1.tests import org.testng.annotations.Test import ru.landgrafhomyak.utility.highlevel_try_finally.safeAutoClose1 -import ru.landgrafhomyak.utility.closeable_state.ManualStateManipulation -import ru.landgrafhomyak.utility.closeable_state.UsagesCounter -import ru.landgrafhomyak.utility.closeable_state.withUse +import ru.landgrafhomyak.utility.closeable_state_1.ManualStateManipulation +import ru.landgrafhomyak.utility.closeable_state_1.UsagesCounter +import ru.landgrafhomyak.utility.closeable_state_1.withUse @Test(enabled = false) class KotlinStdlibDependencyTest { diff --git a/src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt b/src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt similarity index 97% rename from src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt rename to src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt index 943a3ef..4d14076 100644 --- a/src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state/internal/atomics.kt +++ b/src/nonJvmMain/kotlin/ru/landgrafhomyak/utility/closeable_state_1/internal/atomics.kt @@ -1,7 +1,7 @@ @file:Suppress("USELESS_CAST", "NOTHING_TO_INLINE") @file:JvmName("AtomicsKt") -package ru.landgrafhomyak.utility.closeable_state.internal +package ru.landgrafhomyak.utility.closeable_state_1.internal import kotlin.jvm.JvmName import kotlinx.atomicfu.atomic