Skip to content

Commit

Permalink
Set kotlin module names (#575)
Browse files Browse the repository at this point in the history
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

<!--
  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/slack-gradle-plugin/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
  • Loading branch information
ZacSweers authored Sep 22, 2023
1 parent f512ede commit 640c2ac
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 640c2ac

Please sign in to comment.