apply from: rootProject.file(files.lib_app_java_gradle)

android {
    namespace "dev.widget"

    defaultConfig {
        versionCode versions.dev_widget_versionCode
        versionName versions.dev_widget_versionName
        // DevWidget Module Version
        buildConfigField "int", "DevWidget_VersionCode", "${versions.dev_widget_versionCode}"
        buildConfigField "String", "DevWidget_Version", "\"${versions.dev_widget_versionName}\""
        // DevApp Module Version
        buildConfigField "int", "DevApp_VersionCode", "${versions.dev_app_versionCode}"
        buildConfigField "String", "DevApp_Version", "\"${versions.dev_app_versionName}\""
    }
}

// 是否发布版本
def isPublishing = false

dependencies {
    api deps.androidx.design
    api deps.androidx.appcompat
    api deps.androidx.constraint_layout

    if (isPublishing) {
        // 打包时使用
        api deps.dev.dev_app
    } else {
        // 编译时使用
        api project(':DevApp')
    }
}

// tasks-build-assemble
// publishing-publishReleasePublicationToXXXXXRepository
if (isPublishing) {
    apply from: rootProject.file(files.sonatype_upload_android)
}