ansman
07/12/2023, 2:50 PM.kotlin_module file for each compiled module. The name of the file is the name of the module, but this can cause some issues when you have multiple modules with the same name (but different paths). Would it be worth filing a feature request to use the path instead of the module name?Chris Lee
07/12/2023, 2:56 PMmbonnin
07/12/2023, 2:57 PM.kotlin_module info to only those symbols that are in the jar?mbonnin
07/12/2023, 2:58 PMChris Lee
07/12/2023, 2:59 PM.kotlin_module with overlapping module names, rather other challenges such as confusion when pulling project dependencies etc.ansman
07/12/2023, 3:00 PMmbonnin
07/12/2023, 3:00 PMmbonnin
07/12/2023, 3:00 PM.kotlin_module is used for something else?ansman
07/12/2023, 3:01 PMansman
07/12/2023, 3:01 PMansman
07/12/2023, 3:01 PMmoduleName is the best bet hereChris Lee
07/12/2023, 3:01 PMansman
07/12/2023, 3:02 PMkotlin_module are special cased in the Android Gradle Plugin so the normal packaging options doesn't apply to themChris Lee
07/12/2023, 3:03 PMansman
07/12/2023, 3:05 PMmbonnin
07/12/2023, 3:05 PMChris Lee
07/12/2023, 3:05 PMSince the actual names of thefiles do not affect anything at the moment, you can try to rename one of the files during build so that the names are different (the new name should still end with*.kotlin_module). I’m not sure what is the best way to do this in your particular case, though. You might want to exclude the.kotlin_modulefiles using*.kotlin_moduleand add a custom task that extracts the files and puts them as resources, renaming one of them, so that both are included.packagingOptions
mbonnin
07/12/2023, 3:05 PMChris Lee
07/12/2023, 3:05 PMansman
07/12/2023, 3:05 PMcompileOptions.moduleNameChris Lee
07/12/2023, 3:06 PMansman
07/12/2023, 3:06 PMansman
07/12/2023, 3:06 PMChris Lee
07/12/2023, 3:07 PMChris Lee
07/12/2023, 3:08 PMcompileOptions.moduleNameansman
07/12/2023, 3:24 PMtasks.withType<KotlinCompile>().configureEach {
compilerOptions {
moduleName.set(path.removePrefix(":").replace(":", "_"))
}
}Chris Lee
07/12/2023, 3:27 PM_group_ = "<prefix>" + _project_._path_._split_(":")._dropLast_(1)._joinToString_(".")