Hi there, I am creating KMM multimodule project, w...
# multiplatform
s
Hi there, I am creating KMM multimodule project, wherein I am maintaining the each module in explicit repository, and adding them into the main project as git submodules, I have only one project level
libs.versions.toml
throughout the project, I want to segregate dependency related to module in modules
libs.version.toml,
how can I create module level
libs.version.toml
and use them only in modules??
j
What is the point of having a TOML file per module instead of just writing the dependencies directly in the script?
Anyway this is more #gradle than #multiplatform and it is not kotlin but kotlin colored, so probably you should ask in the official Gradle Slack.
👍 1
s
Interesting question, agree Just to keep the things centralised at one place and ease to access.. Yes directly I can use it in script,
What is the point of having a TOML file per module instead of just writing the dependencies directly in the script?
j
Well, you get the convention of "all dependencies are on toml files", but you get: • Manually or create an algorithm in the settings file to add all toml files (build time increased). • Codegen per each toml file (build time increased) • To check for a module dependency, instead of seeing it directly, you need to open the other file (developer time consumed). As version catalogs are a way to centralize the dependencies (literally, mentioned in the docs), your approach is un-centralizing them and getting a worse build time just to get the convention I mentioned before. I don't think it is a good tradeoff, but up to you 🙂
👍 1
s
hmm got it.. My use case is in coming day's we will be using this modules in different projects, that time I want to avoid other team members to again include this dependency on their version catalog file. My assumption to save bit dev effort by doing so, but Agree on your points , #1,2
j
I think you can fix your issue by publishing your catalog to an internal repository (or maven central if it is open source)
s
ho Interesting. I will try internal repository....sorry its not open source project.... Thank you @Javier
🙂 1