How to share a gradle configuration unter submodules

41 Views Asked by At

my project have two modules but whenever I try to create a dependency from configuration on the submodule2 to a configuration on :submoduleA:first, the request fails with configuration is not declared in the descriptor for project, could not resolve project.


myProject
├ submoduleA
| ├ first
| | ├ build.gradle.kts : define configuration
| ├ second
| | ├ build.gradle.kts : define configuration
| ├ settings.gradle: include ':first', ':second'
| ├ build.gradle.kts: include ':first', ':second'
├ submodule2
| ├ build.gradle: implementation project(":submodule:first"), implementation project(":submodule:second")
| ├ settings.gradle: include ':submoduleA:first', ':submoduleA:second'

  • expected the configuration to depend on the configuration on the other subproject but seems failing
0

There are 0 best solutions below