From a8945054896813873c7e4922ab0a4fc83673dbdb Mon Sep 17 00:00:00 2001 From: Aleksei Tiurin Date: Wed, 3 Jul 2024 03:21:20 +0300 Subject: [PATCH] Fix JS support (#74) --- .github/workflows/docs.yml | 2 +- .github/workflows/publish.yml | 2 +- .../com/atiurin/ultron/exceptions/UltronWrapperException.kt | 2 +- .../kotlin/com/atiurin/ultron/listeners/AbstractListener.kt | 2 +- .../com/atiurin/ultron/listeners/AbstractListenersContainer.kt | 2 +- .../src/commonMain/kotlin/com/atiurin/ultron/log/ULogger.kt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4964e8d7..f2edfce4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Build and deploy docs on: push: branches: - - master + - docs jobs: github-pages: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 012728c0..3231275f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,7 +6,7 @@ permissions: on: push: tags: - - 'v*' + - '*' jobs: publish: diff --git a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/exceptions/UltronWrapperException.kt b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/exceptions/UltronWrapperException.kt index 08d532a2..264580c3 100644 --- a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/exceptions/UltronWrapperException.kt +++ b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/exceptions/UltronWrapperException.kt @@ -6,7 +6,7 @@ class UltronWrapperException : AssertionError { : super( "$message${ if (cause is UltronWrapperException || cause is UltronOperationException) "" - else "\nOriginal error - ${cause::class.qualifiedName}: ${cause.message}" + else "\nOriginal error - ${cause::class.simpleName}: ${cause.message}" }" ) } \ No newline at end of file diff --git a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListener.kt b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListener.kt index c72d3ac3..e76e0da9 100644 --- a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListener.kt +++ b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListener.kt @@ -6,6 +6,6 @@ abstract class AbstractListener { this.id = id } constructor(){ - this.id = this::class.qualifiedName.orEmpty() + this.id = this::class.simpleName.orEmpty() } } \ No newline at end of file diff --git a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListenersContainer.kt b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListenersContainer.kt index b87274df..8b569f59 100644 --- a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListenersContainer.kt +++ b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/listeners/AbstractListenersContainer.kt @@ -27,7 +27,7 @@ abstract class AbstractListenersContainer { } fun removeListener(listenerClass: KClass) { - val exist = listeners.find { it.id == listenerClass.qualifiedName } + val exist = listeners.find { it.id == listenerClass.simpleName } if (exist != null) { listeners.remove(exist) } diff --git a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/log/ULogger.kt b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/log/ULogger.kt index 887f8a58..fc4e893b 100644 --- a/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/log/ULogger.kt +++ b/ultron-common/src/commonMain/kotlin/com/atiurin/ultron/log/ULogger.kt @@ -7,7 +7,7 @@ abstract class ULogger { this.id = id } constructor(){ - this.id = this::class.qualifiedName.orEmpty() + this.id = this::class.simpleName.orEmpty() } abstract fun info(message: String): Any