I'm trying to clean up our codebase a bit by modularization.
My target structure is something like this:
app
feature1
  models
  view
  …etc
feature2
  models
  view
  …etc
So I've got a module for each feature, and underneath I have a submodule structure which is basically the same per feature module.
Everything looks find in the project view, but when I try to build or sync, I get errors like:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'META-INF/models_debug.kotlin_module'.
So I basically get what the issue here is: I got two or more modules with the same name. Right now my solution is to basically add a prefix to each module name:
app
feature1
  feature1-models
  feature1-view
  …etc
feature2
  feature2-models
  feature2-view
  …etc
which works fine, but I just don't like the redundancy here when looking at my project view.
So does anybody know a way for me to keep my target module structure?
Edit: Seems like this might have something to do with the Kotlin Compiler, so added specific tags for that.