apply plugin: 'com.android.application'

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.hjq.shape.demo"
        minSdkVersion 17
        // noinspection ExpiredTargetSdkVersion
        targetSdkVersion 28
        versionCode 1000
        versionName "10.0"
    }

    // 支持 Java JDK 8
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

    // Apk 签名的那些事：https://www.jianshu.com/p/a1f8e5896aa2
    signingConfigs {
        config {
            storeFile file(StoreFile)
            storePassword StorePassword
            keyAlias KeyAlias
            keyPassword KeyPassword
        }
    }

    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }

        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
    }

    applicationVariants.configureEach { variant ->
        // apk 输出文件名配置
        variant.outputs.configureEach { output ->
            outputFileName = rootProject.getName() + '.apk'
        }
    }
}

dependencies {
    // 依赖 libs 目录下所有的 jar 和 aar 包
    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')

    implementation project(':library')

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'

    // 标题栏框架：https://github.com/getActivity/TitleBar
    implementation 'com.github.getActivity:TitleBar:10.6'

    // 内存泄漏检测：https://github.com/square/leakcanary
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
}