From 4913e99c2e4e89949d7662d69bcc8e4dea5f9fa8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 26 Jul 2024 16:40:30 +0600 Subject: [PATCH 1/2] start 0.21.6 --- CHANGELOG.md | 2 ++ gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7073379f1b5..9d1176879f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.21.6 + ## 0.21.5 * `KSP`: diff --git a/gradle.properties b/gradle.properties index 92bac1cd669..00bb79cbadb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,5 +15,5 @@ crypto_js_version=4.1.1 # Project data group=dev.inmo -version=0.21.5 -android_code_version=264 +version=0.21.6 +android_code_version=265 From ad401105a1b62be9f4d6b9ba311fa7af2b83537a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 26 Jul 2024 17:17:11 +0600 Subject: [PATCH 2/2] fixes in ksp sealed generator --- CHANGELOG.md | 4 ++++ ksp/sealed/generator/src/main/kotlin/Processor.kt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d1176879f5..34ce9695623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.21.6 +* `KSP`: + * `Sealed`: + * Fixes in generation + ## 0.21.5 * `KSP`: diff --git a/ksp/sealed/generator/src/main/kotlin/Processor.kt b/ksp/sealed/generator/src/main/kotlin/Processor.kt index de653834d08..6eca44452a7 100644 --- a/ksp/sealed/generator/src/main/kotlin/Processor.kt +++ b/ksp/sealed/generator/src/main/kotlin/Processor.kt @@ -26,7 +26,8 @@ class Processor( private fun KSClassDeclaration.findSealedConnection(potentialSealedParent: KSClassDeclaration): Boolean { val targetClassname = potentialSealedParent.qualifiedName ?.asString() return superTypes.any { - targetClassname == ((it.resolve().declaration as? KSClassDeclaration) ?.qualifiedName ?.asString()) || (it is KSClassDeclaration && it.getSealedSubclasses().any() && it.findSealedConnection(potentialSealedParent)) + val itAsDeclaration = it.resolve().declaration as? KSClassDeclaration ?: return@any false + targetClassname == (itAsDeclaration.qualifiedName ?.asString()) || (itAsDeclaration.getSealedSubclasses().any() && itAsDeclaration.findSealedConnection(potentialSealedParent)) } }