plugins {
    id 'software.amazon.app.platform'

    // This plugin lives in the buildSrc directory and is not published.
    // It's used to manage certain configurations and dependencies for all
    // :sample:* modules, otherwise we'd need to repeat them several times.
    id 'software.amazon.app.platform.app'

    alias libs.plugins.compose.hot.reload
}

// This extension comes from our published plugin.
appPlatform {
    enableComposeUi true
    enableKotlinInject true
    enableModuleStructure true
    enableMoleculePresenters true
    addImplModuleDependencies true
}

// This extension comes from buildSrc.
appPlatformBuildSrc {
    enableInstrumentedTests true
}

android {
    defaultConfig {
        testInstrumentationRunner 'software.amazon.app.platform.sample.TestRunner'
    }
}

dependencies {
    commonMainImplementation project(':sample:login:impl')
    commonMainImplementation project(':sample:navigation:impl')
    commonMainImplementation project(':sample:templates:impl')
    commonMainImplementation project(':sample:user:impl')

    androidMainImplementation libs.androidx.activity.compose

    desktopTestImplementation project(':robot-compose-multiplatform:public')
    desktopTestImplementation project(':sample:login:impl-robots')
    desktopTestImplementation project(':sample:user:impl-robots')

    androidInstrumentedTestImplementation project(':robot-compose-multiplatform:public')
    androidInstrumentedTestImplementation project(':sample:login:impl-robots')
    androidInstrumentedTestImplementation project(':sample:user:impl-robots')
    androidInstrumentedTestImplementation libs.compose.ui.test.junit4
    androidInstrumentedTestImplementation libs.compose.ui.test.junit4.android
    androidInstrumentedTestImplementation libs.compose.ui.test.manifest
}
