5

I'm using this new module type and i was wondering if it's possible to use it inside a directory. So i moved "home" module inside the "ui" directory as an example and got this error:

ERROR: Unable to find matching projects for Dynamic Features: [:ui:home]. Affected Modules: app

But gradle has no problem with other modules being sub-modules, so i guess the problem might be specific to dynamic-feature

Here is the "app" module gradle:

.
.
.
android {
    compileSdkVersion AppMetaData.compileSdkVersion
    defaultConfig {
        applicationId AppMetaData.id
        minSdkVersion AppMetaData.minSdkVersion
        targetSdkVersion AppMetaData.targetSdkVersion
        versionCode AppMetaData.versionCode
        versionName AppMetaData.versionName
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        buildConfigField "boolean", "DEBUG_LOGS", "true"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    dynamicFeatures = [Modules.home]
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(Modules.common)
    implementation project(Modules.domain)
    implementation project(Modules.navigation)
    implementation project(Modules.network)
    implementation project(Modules.persistence)
    .
    .
    .
}
object Modules {
    const val app = ":app"
    const val common = ":common"
    const val domain = ":core:domain"
    const val navigation = ":ui:navigation"
    const val network = ":core:network"
    const val persistence = ":core:persistence"

    // Dynamics
    const val home = ":ui:home"
}
Peyman
  • 941
  • 8
  • 28
  • 2
    Gradle modules like this are supported. Can you please share the project's directory structure as well as some outline of the dynamic feature module's `build.gradle` file as well as your project's `settings.gradle`. – Ben Weiss Sep 11 '19 at 12:57

0 Answers0