From 640c2acf287e4292dcd8301131f81f5b34639570 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Fri, 22 Sep 2023 15:56:38 -0400 Subject: [PATCH] Set kotlin module names (#575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the kotlin module name to a dashified version of the project path to ensure uniqueness in created .kotlin_module files. This is particularly important for kotlin-reflect usages and anything else that introspects kotlin metadata --- .../kotlin/slack/gradle/StandardProjectConfigurations.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/slack-plugin/src/main/kotlin/slack/gradle/StandardProjectConfigurations.kt b/slack-plugin/src/main/kotlin/slack/gradle/StandardProjectConfigurations.kt index 1418fdf7a..1c6ff798c 100644 --- a/slack-plugin/src/main/kotlin/slack/gradle/StandardProjectConfigurations.kt +++ b/slack-plugin/src/main/kotlin/slack/gradle/StandardProjectConfigurations.kt @@ -939,6 +939,11 @@ internal class StandardProjectConfigurations( // Potentially useful for static analysis or annotation processors javaParameters.set(true) freeCompilerArgs.addAll(KotlinBuildConfig.kotlinJvmCompilerArgs) + + // Set the module name to a dashified version of the project path to ensure uniqueness + // in created .kotlin_module files + val pathProvider = project.provider { project.path.replace(":", "-") } + moduleName.set(pathProvider) } } }