From f3617c86bd9f26c1538e983b06ff82d35a143bc8 Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Wed, 28 Aug 2024 15:10:57 -0400 Subject: [PATCH 1/6] Fix Kotlin Metadata unique_name value so that it is actually unique --- .../src/main/kotlin/publication.gradle.kts | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/build-logic/src/main/kotlin/publication.gradle.kts b/build-logic/src/main/kotlin/publication.gradle.kts index 4cb96ec13..6c4e5d5ac 100644 --- a/build-logic/src/main/kotlin/publication.gradle.kts +++ b/build-logic/src/main/kotlin/publication.gradle.kts @@ -29,3 +29,71 @@ tasks.withType().configureEach { isPreserveFileTimestamps = false isReproducibleFileOrder = true } + +// Hooks into project's metadata compilation task to ensure that the `unique_name` +// attribute is properly prefixed with the project group name, instead of just the +// `{module name}_sourceSet` +// +// Requires that `GROUP` is set in gradle.properties, or that project.group is set. +// +// Enable debug output by adding the following to root-project gradle.properties: +// +// kotlin.mpp.fixMetadataUniqueNameDebug=true +// +// https://youtrack.jetbrains.com/issue/KT-66568/w-KLIB-resolver-The-same-uniquename...-found-in-more-than-one-library +tasks.all { + if (!name.startsWith("compile")) return@all + if (!name.endsWith("MainKotlinMetadata")) return@all + + // Take gradle.properties `GROUP`, otherwise use `project.group` + val groupName = properties["GROUP"] + ?.toString() + ?.ifBlank { null } + ?: project.group.toString() + .ifBlank { null } + + if (groupName.isNullOrBlank()) { + throw GradleException("group cannot be null or blank") + } + + doLast { + outputs.files.files.forEach out@ { output -> + val manifests = output.walkTopDown().mapNotNull { file -> + file.takeIf { it.name == "manifest" } + } + manifests.forEach { manifest -> + val lines = manifest.readLines() + val map = LinkedHashMap(lines.size, 1.0f) + + for (line in lines) { + val i = line.indexOf('=') + if (i == -1) continue + map[line.substring(0, i)] = line.substring(i + 1) + } + + val current = map["unique_name"] ?: return@forEach + if (current.startsWith(groupName)) return@forEach + val new = "$groupName\\:$current" + + if (properties["kotlin.mpp.fixMetadataUniqueNameDebug"] == "true") { + println(""" + Misconfigured unique_name metadata attribute + for $manifest + Changing from '$current' to '$new' + """.trimIndent()) + } + + map["unique_name"] = new + + manifest.bufferedWriter().use { writer -> + map.entries.forEach { (key, value) -> + writer.write(key) + writer.write("=") + writer.write(value) + writer.newLine() + } + } + } + } + } +} From d8bec49ebd29430768480ec00c1db7bffdcea0ca Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Wed, 28 Aug 2024 15:18:19 -0400 Subject: [PATCH 2/6] Throw exception when whitespace and/or new lines --- build-logic/src/main/kotlin/publication.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-logic/src/main/kotlin/publication.gradle.kts b/build-logic/src/main/kotlin/publication.gradle.kts index 6c4e5d5ac..e704e5906 100644 --- a/build-logic/src/main/kotlin/publication.gradle.kts +++ b/build-logic/src/main/kotlin/publication.gradle.kts @@ -56,6 +56,10 @@ tasks.all { throw GradleException("group cannot be null or blank") } + if (groupName.indexOfFirst { it.isWhitespace() } != -1) { + throw GradleException("group cannot contain whitespace or new lines") + } + doLast { outputs.files.files.forEach out@ { output -> val manifests = output.walkTopDown().mapNotNull { file -> From a1a2e613029e51c59051ad0fdce0e96457e1ee86 Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Wed, 28 Aug 2024 21:13:48 -0400 Subject: [PATCH 3/6] Move snippet to root build.gradle.kts file --- .../src/main/kotlin/publication.gradle.kts | 72 ----------- build.gradle.kts | 112 ++++++++++++++++++ gradle.properties | 1 + 3 files changed, 113 insertions(+), 72 deletions(-) diff --git a/build-logic/src/main/kotlin/publication.gradle.kts b/build-logic/src/main/kotlin/publication.gradle.kts index e704e5906..4cb96ec13 100644 --- a/build-logic/src/main/kotlin/publication.gradle.kts +++ b/build-logic/src/main/kotlin/publication.gradle.kts @@ -29,75 +29,3 @@ tasks.withType().configureEach { isPreserveFileTimestamps = false isReproducibleFileOrder = true } - -// Hooks into project's metadata compilation task to ensure that the `unique_name` -// attribute is properly prefixed with the project group name, instead of just the -// `{module name}_sourceSet` -// -// Requires that `GROUP` is set in gradle.properties, or that project.group is set. -// -// Enable debug output by adding the following to root-project gradle.properties: -// -// kotlin.mpp.fixMetadataUniqueNameDebug=true -// -// https://youtrack.jetbrains.com/issue/KT-66568/w-KLIB-resolver-The-same-uniquename...-found-in-more-than-one-library -tasks.all { - if (!name.startsWith("compile")) return@all - if (!name.endsWith("MainKotlinMetadata")) return@all - - // Take gradle.properties `GROUP`, otherwise use `project.group` - val groupName = properties["GROUP"] - ?.toString() - ?.ifBlank { null } - ?: project.group.toString() - .ifBlank { null } - - if (groupName.isNullOrBlank()) { - throw GradleException("group cannot be null or blank") - } - - if (groupName.indexOfFirst { it.isWhitespace() } != -1) { - throw GradleException("group cannot contain whitespace or new lines") - } - - doLast { - outputs.files.files.forEach out@ { output -> - val manifests = output.walkTopDown().mapNotNull { file -> - file.takeIf { it.name == "manifest" } - } - manifests.forEach { manifest -> - val lines = manifest.readLines() - val map = LinkedHashMap(lines.size, 1.0f) - - for (line in lines) { - val i = line.indexOf('=') - if (i == -1) continue - map[line.substring(0, i)] = line.substring(i + 1) - } - - val current = map["unique_name"] ?: return@forEach - if (current.startsWith(groupName)) return@forEach - val new = "$groupName\\:$current" - - if (properties["kotlin.mpp.fixMetadataUniqueNameDebug"] == "true") { - println(""" - Misconfigured unique_name metadata attribute - for $manifest - Changing from '$current' to '$new' - """.trimIndent()) - } - - map["unique_name"] = new - - manifest.bufferedWriter().use { writer -> - map.entries.forEach { (key, value) -> - writer.write(key) - writer.write("=") - writer.write(value) - writer.newLine() - } - } - } - } - } -} diff --git a/build.gradle.kts b/build.gradle.kts index 1d1179605..3bdfc7c5e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,6 +15,7 @@ **/ import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension +import org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool plugins { alias(libs.plugins.kotlin.multiplatform) apply(false) @@ -56,3 +57,114 @@ apiValidation { nonPublicMarkers.add("io.matthewnelson.kmp.tor.core.api.annotation.InternalKmpTorApi") } } + +/** + * Corrects metadata manifest value for `unique_name` for all source sets + * by ensuring it is prefixed with the [Project.getGroup] identifier. + * + * e.g. (Metadata manifest for module :runtime + source set commonMain) + * + * // Before + * abi_version=1.8.0 + * compiler_version=1.9.24 + * ir_signature_versions=1,2 + * metadata_version=1.4.1 + * unique_name=runtime_commonMain + * + * // After + * abi_version=1.8.0 + * compiler_version=1.9.24 + * ir_signature_versions=1,2 + * metadata_version=1.4.1 + * unique_name=io.matthewnelson.kmp-tor\:runtime_commonMain + * + * Kotlin `2.0.0+` uses the K2 compiler, so any dependency with a module name + * of `runtime` will cause a conflict. For example, having `kmp-tor:runtime` + * and `jetbrains.compose:runtime` dependencies for `commonMain` on the same + * project would cause a build failure. + * + * Run `./gradlew metadataCommonMainClasses` and look at output for fixed fields. + * + * See: https://youtrack.jetbrains.com/issue/KT-66568/ + * */ +@Suppress("RedundantSamConstructor") +rootProject.allprojects(Action { + val project = this + + tasks.withType().all compile@ { + val task = this + + if (!task.name.startsWith("compile")) return@compile + if (!task.name.endsWith("MainKotlinMetadata")) return@compile + + task.doLast { + task.outputs.files.files.flatMap { output -> + output.walkTopDown().mapNotNull { file -> + file.takeIf { it.isFile && it.name == "manifest" } + } + }.forEach { manifest -> + val content = manifest.readLines().let { lines -> + val map = LinkedHashMap(lines.size, 1.0f) + for (line in lines) { + if (line.isBlank()) continue + + val iEq = line.indexOf('=') + if (iEq == -1) { + throw GradleException( + "Metadata manifest file contents invalid. " + + "Contains invalid key-value-pairs '$line'" + ) + } + map[line.substring(0, iEq)] = line.substring(iEq + 1) + } + map + } + + val old = content["unique_name"] ?: return@forEach + + // Has an actual unique_name value, such + // as `io.matthewnelson.kmp-tor\:runtime_commonMain` + // + // if it did not, it would simply be `runtime_commonMain` + if (old.contains(':')) return@forEach + + val groupId = project.group.toString() + if (groupId.isBlank()) { + throw GradleException( + "Unable to fix metadata manifest 'unique_name' value of $old." + + " Project.group was blank." + ) + } + + if (groupId.indexOfFirst { it.isWhitespace() } != -1) { + throw GradleException( + "Unable to fix metadata manifest 'unique_name' value of $old." + + " Project.group contains whitespace" + ) + } + + val new = "$groupId\\:$old" + + val silence = "kotlin.mpp.silenceFixUniqueName" + if (project.properties[silence] != "true") { + println(""" + Kotlin Metadata 'unique_name' value fixed. + Old[$old] >> New[$new] + This message can be disabled by adding '$silence=true' to gradle.properties + """.trimIndent()) + } + + content["unique_name"] = new + + manifest.bufferedWriter().use { writer -> + content.entries.forEach { (key, value) -> + writer.write(key) + writer.write("=") + writer.write(value) + writer.newLine() + } + } + } + } + } +}) diff --git a/gradle.properties b/gradle.properties index 0be9dc29b..17b557152 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,7 @@ kotlin.code.style=official kotlin.mpp.applyDefaultHierarchyTemplate=false kotlin.mpp.enableCInteropCommonization=true kotlin.mpp.stability.nowarn=true +kotlin.mpp.silenceFixUniqueName=true kotlin.native.ignoreDisabledTargets=true SONATYPE_HOST=S01 From 64ce9c1062a77b8917a70de683f8f40ad89401ed Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Thu, 29 Aug 2024 09:48:22 -0400 Subject: [PATCH 4/6] Migrate metadata fix to plugin --- build.gradle.kts | 115 +------------------------------------- gradle.properties | 3 +- gradle/libs.versions.toml | 2 + 3 files changed, 6 insertions(+), 114 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3bdfc7c5e..592ef080a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,14 +15,14 @@ **/ import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension -import org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool plugins { - alias(libs.plugins.kotlin.multiplatform) apply(false) alias(libs.plugins.android.app) apply(false) alias(libs.plugins.android.library) apply(false) alias(libs.plugins.binary.compat) alias(libs.plugins.dokka) + alias(libs.plugins.fix.kmp.metadata) + alias(libs.plugins.kotlin.multiplatform) apply(false) } allprojects { @@ -57,114 +57,3 @@ apiValidation { nonPublicMarkers.add("io.matthewnelson.kmp.tor.core.api.annotation.InternalKmpTorApi") } } - -/** - * Corrects metadata manifest value for `unique_name` for all source sets - * by ensuring it is prefixed with the [Project.getGroup] identifier. - * - * e.g. (Metadata manifest for module :runtime + source set commonMain) - * - * // Before - * abi_version=1.8.0 - * compiler_version=1.9.24 - * ir_signature_versions=1,2 - * metadata_version=1.4.1 - * unique_name=runtime_commonMain - * - * // After - * abi_version=1.8.0 - * compiler_version=1.9.24 - * ir_signature_versions=1,2 - * metadata_version=1.4.1 - * unique_name=io.matthewnelson.kmp-tor\:runtime_commonMain - * - * Kotlin `2.0.0+` uses the K2 compiler, so any dependency with a module name - * of `runtime` will cause a conflict. For example, having `kmp-tor:runtime` - * and `jetbrains.compose:runtime` dependencies for `commonMain` on the same - * project would cause a build failure. - * - * Run `./gradlew metadataCommonMainClasses` and look at output for fixed fields. - * - * See: https://youtrack.jetbrains.com/issue/KT-66568/ - * */ -@Suppress("RedundantSamConstructor") -rootProject.allprojects(Action { - val project = this - - tasks.withType().all compile@ { - val task = this - - if (!task.name.startsWith("compile")) return@compile - if (!task.name.endsWith("MainKotlinMetadata")) return@compile - - task.doLast { - task.outputs.files.files.flatMap { output -> - output.walkTopDown().mapNotNull { file -> - file.takeIf { it.isFile && it.name == "manifest" } - } - }.forEach { manifest -> - val content = manifest.readLines().let { lines -> - val map = LinkedHashMap(lines.size, 1.0f) - for (line in lines) { - if (line.isBlank()) continue - - val iEq = line.indexOf('=') - if (iEq == -1) { - throw GradleException( - "Metadata manifest file contents invalid. " + - "Contains invalid key-value-pairs '$line'" - ) - } - map[line.substring(0, iEq)] = line.substring(iEq + 1) - } - map - } - - val old = content["unique_name"] ?: return@forEach - - // Has an actual unique_name value, such - // as `io.matthewnelson.kmp-tor\:runtime_commonMain` - // - // if it did not, it would simply be `runtime_commonMain` - if (old.contains(':')) return@forEach - - val groupId = project.group.toString() - if (groupId.isBlank()) { - throw GradleException( - "Unable to fix metadata manifest 'unique_name' value of $old." + - " Project.group was blank." - ) - } - - if (groupId.indexOfFirst { it.isWhitespace() } != -1) { - throw GradleException( - "Unable to fix metadata manifest 'unique_name' value of $old." + - " Project.group contains whitespace" - ) - } - - val new = "$groupId\\:$old" - - val silence = "kotlin.mpp.silenceFixUniqueName" - if (project.properties[silence] != "true") { - println(""" - Kotlin Metadata 'unique_name' value fixed. - Old[$old] >> New[$new] - This message can be disabled by adding '$silence=true' to gradle.properties - """.trimIndent()) - } - - content["unique_name"] = new - - manifest.bufferedWriter().use { writer -> - content.entries.forEach { (key, value) -> - writer.write(key) - writer.write("=") - writer.write(value) - writer.newLine() - } - } - } - } - } -}) diff --git a/gradle.properties b/gradle.properties index 17b557152..fe402ab3a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,11 +6,12 @@ org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true +io.matthewnelson.silenceFixKmpMetadata=true + kotlin.code.style=official kotlin.mpp.applyDefaultHierarchyTemplate=false kotlin.mpp.enableCInteropCommonization=true kotlin.mpp.stability.nowarn=true -kotlin.mpp.silenceFixUniqueName=true kotlin.native.ignoreDisabledTargets=true SONATYPE_HOST=S01 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2cf7f157b..91b8be8b8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,6 +8,7 @@ encoding = "2.2.1" gradle-android = "8.2.2" gradle-binary-compat = "0.14.0" gradle-dokka = "1.9.20" +gradle-fix-kmp-metadata = "0.1.0" gradle-kmp-configuration = "0.2.2" gradle-kotlin = "1.9.24" gradle-publish-maven = "0.28.0" @@ -57,4 +58,5 @@ android-app = { id = "com.android.application", version.ref = "gradle-android" } android-library = { id = "com.android.library", version.ref = "gradle-android" } binary-compat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "gradle-binary-compat" } dokka = { id = "org.jetbrains.dokka", version.ref = "gradle-dokka" } +fix-kmp-metadata = { id = "io.matthewnelson.fix.kmp.metadata", version.ref = "gradle-fix-kmp-metadata" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "gradle-kotlin" } From cdb72da0da4579abc88f8fc2c08536c618559532 Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Thu, 29 Aug 2024 21:27:47 -0400 Subject: [PATCH 5/6] Update kmp-configuration plugin with all the fixes --- build-logic/src/main/kotlin/-KmpConfigurationExtension.kt | 4 ++++ build-logic/src/main/kotlin/dokka.gradle.kts | 4 ++-- build.gradle.kts | 1 - gradle.properties | 2 -- gradle/libs.versions.toml | 4 +--- library/runtime-core/api/runtime-core.api | 4 ++-- library/runtime-service-ui/build.gradle.kts | 4 ++++ library/runtime-service/build.gradle.kts | 4 ++++ 8 files changed, 17 insertions(+), 10 deletions(-) diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index d3416d8c7..330a755f8 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -25,6 +25,10 @@ fun KmpConfigurationExtension.configureShared( action: Action ) { configure { + options { + useUniqueModuleNames = true + } + if (androidNamespace != null) { androidLibrary(namespace = androidNamespace) { if (publish) target { publishLibraryVariants("release") } diff --git a/build-logic/src/main/kotlin/dokka.gradle.kts b/build-logic/src/main/kotlin/dokka.gradle.kts index 849c651f0..4aab9a715 100644 --- a/build-logic/src/main/kotlin/dokka.gradle.kts +++ b/build-logic/src/main/kotlin/dokka.gradle.kts @@ -15,7 +15,7 @@ **/ import org.jetbrains.dokka.DokkaConfiguration.Visibility import org.jetbrains.dokka.gradle.DokkaTaskPartial -import java.net.URL +import java.net.URI plugins { id("org.jetbrains.dokka") @@ -32,7 +32,7 @@ tasks.withType().configureEach { dokkaSourceSets.configureEach { sourceLink { localDirectory = rootDir - remoteUrl = URL("https://github.com/05nelsonm/kmp-tor/tree/master") + remoteUrl = URI("https://github.com/05nelsonm/kmp-tor/tree/master").toURL() remoteLineSuffix = "#L" } } diff --git a/build.gradle.kts b/build.gradle.kts index 592ef080a..21ec4dcab 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,6 @@ plugins { alias(libs.plugins.android.library) apply(false) alias(libs.plugins.binary.compat) alias(libs.plugins.dokka) - alias(libs.plugins.fix.kmp.metadata) alias(libs.plugins.kotlin.multiplatform) apply(false) } diff --git a/gradle.properties b/gradle.properties index fe402ab3a..0be9dc29b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,8 +6,6 @@ org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true -io.matthewnelson.silenceFixKmpMetadata=true - kotlin.code.style=official kotlin.mpp.applyDefaultHierarchyTemplate=false kotlin.mpp.enableCInteropCommonization=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 91b8be8b8..a36084b89 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,8 +8,7 @@ encoding = "2.2.1" gradle-android = "8.2.2" gradle-binary-compat = "0.14.0" gradle-dokka = "1.9.20" -gradle-fix-kmp-metadata = "0.1.0" -gradle-kmp-configuration = "0.2.2" +gradle-kmp-configuration = "0.3.1" gradle-kotlin = "1.9.24" gradle-publish-maven = "0.28.0" @@ -58,5 +57,4 @@ android-app = { id = "com.android.application", version.ref = "gradle-android" } android-library = { id = "com.android.library", version.ref = "gradle-android" } binary-compat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "gradle-binary-compat" } dokka = { id = "org.jetbrains.dokka", version.ref = "gradle-dokka" } -fix-kmp-metadata = { id = "io.matthewnelson.fix.kmp.metadata", version.ref = "gradle-fix-kmp-metadata" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "gradle-kotlin" } diff --git a/library/runtime-core/api/runtime-core.api b/library/runtime-core/api/runtime-core.api index 7598081c6..162a6aaaa 100644 --- a/library/runtime-core/api/runtime-core.api +++ b/library/runtime-core/api/runtime-core.api @@ -4262,14 +4262,14 @@ public final class io/matthewnelson/kmp/tor/runtime/core/net/LocalHost$Companion public final class io/matthewnelson/kmp/tor/runtime/core/net/LocalHost$IPv4 : io/matthewnelson/kmp/tor/runtime/core/net/LocalHost { public static final field INSTANCE Lio/matthewnelson/kmp/tor/runtime/core/net/LocalHost$IPv4; - public synthetic fun fromCache$runtime_core ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; + public synthetic fun fromCache$io_matthewnelson_kmp_tor_runtime_core_jvm ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; public fun resolve ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress$V4; public synthetic fun resolve ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; } public final class io/matthewnelson/kmp/tor/runtime/core/net/LocalHost$IPv6 : io/matthewnelson/kmp/tor/runtime/core/net/LocalHost { public static final field INSTANCE Lio/matthewnelson/kmp/tor/runtime/core/net/LocalHost$IPv6; - public synthetic fun fromCache$runtime_core ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; + public synthetic fun fromCache$io_matthewnelson_kmp_tor_runtime_core_jvm ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; public fun resolve ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress$V6; public synthetic fun resolve ()Lio/matthewnelson/kmp/tor/runtime/core/net/IPAddress; } diff --git a/library/runtime-service-ui/build.gradle.kts b/library/runtime-service-ui/build.gradle.kts index 24271761b..0d96d5e65 100644 --- a/library/runtime-service-ui/build.gradle.kts +++ b/library/runtime-service-ui/build.gradle.kts @@ -19,6 +19,10 @@ plugins { kmpConfiguration { configure { + options { + useUniqueModuleNames = true + } + androidLibrary(namespace = "io.matthewnelson.kmp.tor.runtime.service.ui") { target { publishLibraryVariants("release") } diff --git a/library/runtime-service/build.gradle.kts b/library/runtime-service/build.gradle.kts index 56b72e181..028cc202d 100644 --- a/library/runtime-service/build.gradle.kts +++ b/library/runtime-service/build.gradle.kts @@ -19,6 +19,10 @@ plugins { kmpConfiguration { configure { + options { + useUniqueModuleNames = true + } + androidLibrary(namespace = "io.matthewnelson.kmp.tor.runtime.service") { target { publishLibraryVariants("release") } From 64984ef9c87dd80f61c00b3d7825c0ff98c210aa Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Thu, 29 Aug 2024 22:59:22 -0400 Subject: [PATCH 6/6] Bump kmp-configuration plugin to fix .kotlin_module file name --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a36084b89..f10f3d6dc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ encoding = "2.2.1" gradle-android = "8.2.2" gradle-binary-compat = "0.14.0" gradle-dokka = "1.9.20" -gradle-kmp-configuration = "0.3.1" +gradle-kmp-configuration = "0.3.2" gradle-kotlin = "1.9.24" gradle-publish-maven = "0.28.0"