apply from: rootProject.file(files.lib_app_gradle)

android {
    namespace "dev.capture.compiler"

    defaultConfig {
        versionCode versions.dev_http_capture_versionCode
        versionName versions.dev_http_capture_compiler_version
        // DevHttpCaptureCompiler Module Version
        buildConfigField "int", "DevHttpCaptureCompiler_VersionCode", "${versions.dev_http_capture_versionCode}"
        buildConfigField "String", "DevHttpCaptureCompiler_Version", "\"${versions.dev_http_capture_compiler_version}\""
        // DevAssist Module Version
        buildConfigField "int", "DevAssist_VersionCode", "${versions.dev_assist_versionCode}"
        buildConfigField "String", "DevAssist_Version", "\"${versions.dev_assist_versionName}\""
        // DevHttpCapture Module Version
        buildConfigField "int", "DevHttpCapture_VersionCode", "${versions.dev_http_capture_versionCode}"
        buildConfigField "String", "DevHttpCapture_Version", "\"${versions.dev_http_capture_versionName}\""
    }

    buildFeatures {
        // View Binding
        viewBinding = true
    }
}

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

dependencies {
    if (isPublishing) {
        // 打包时使用
        api deps.dev.dev_assist
        api deps.dev.dev_http_capture
    } else {
        // 编译时使用
        api project(':DevAssist')
        api project(':DevHttpCapture')
    }
}

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