0

I'm trying to modularize my app but I've got a problem.

I've got four modules, app and instantapp as applicatio and as a feature, base and detail, ok?

base is the main feature (com.android.feature) where I've got most of my logic gradle file:

apply plugin: 'com.android.feature'

 bla bla bla

dependencies {
    application project(":app")
    feature project(":details")
}

details gradel file:

apply plugin: 'com.android.feature'

bla bla bla

dependencies {
    implementation project(':base')
}

Android manifest from base has a package called: com.jtcsoft.com and details feature has a package: com.jtcsoft.com.details.

Everything works fine in details BUT in base feature I the details feature classes are not found :( Android Studio tells me to add a compile project(":details") in base config but this causes a circular dependency.

What am I doing wrong? :(

Thanks a lot in advance!

MrCester
  • 43
  • 9
  • The base feature module is a fundamental module of your android instant app, with all other feature modules depend on it. You can refer AIA project structure: https://developer.android.com/topic/instant-apps/getting-started/structure.html#basic-app _As already mentioned, dependencies between feature modules are unidirectional, so ‘base’ cannot depend on ‘details’._ – ManmeetP Nov 06 '17 at 04:51

1 Answers1

1

Dependencies between features may only be unidirectional. It's okay for "details" to depend on anything inside "base", but not the other way around.

dchai
  • 231
  • 2
  • 4