plugins {
    id 'com.android.application'
}

android {
    namespace 'com.ewt45.patchapp'
    compileSdk 34

    defaultConfig {
        applicationId "com.ewt45.patchapp"
        minSdk 23
        //noinspection ExpiredTargetSdkVersion
        targetSdk 27
        versionCode 13
        versionName '1.1.0'
        resourceConfigurations += ['en', 'zh', 'ru']
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            //代码和资源缩减(不行，否则FileProvider的类名也跟着变了，然后找不到类。。。）
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
    lint {
        baseline = file("lint-baseline.xml")
    }

    // 自定义打包名称
    applicationVariants.configureEach { variant ->
        variant.outputs.configureEach {
            outputFileName = "EDPatch-beta.apk"
        }
    }
}


dependencies {

    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
    implementation 'android.arch.navigation:navigation-fragment:1.0.0'
    implementation 'android.arch.navigation:navigation-ui:1.0.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:preference-v7:28.0.0'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.28'
    implementation 'android.arch.lifecycle:livedata:1.1.1'
    implementation 'android.arch.lifecycle:viewmodel:1.1.1'
    compileOnly 'commons-io:commons-io:2.11.0'

    implementation 'com.squareup.okhttp3:okhttp:3.14.9'
    implementation 'com.google.code.gson:gson:2.10.1'


    implementation files('libs/apktool-cli-all.jar')
    implementation project(path: ':apksig')
    testImplementation project(path: ':xml')


// https://mvnrepository.com/artifact/org.apktool/brut.j.common
//    implementation 'org.apktool:brut.j.common:2.7.0'
//// https://mvnrepository.com/artifact/org.apktool/brut.j.util
//    implementation 'org.apktool:brut.j.util:2.7.0'
//// https://mvnrepository.com/artifact/org.apktool/brut.j.dir
//    implementation 'org.apktool:brut.j.dir:2.7.0'
//// https://mvnrepository.com/artifact/org.apktool/apktool-lib
//    implementation 'org.apktool:apktool-lib:2.7.0'




    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//    //compile fileTree(dir: 'libs', include: ['*.jar'])
//    //compile project(':mylibrary')
//
//    //compileOnly files('libs/mysdk.jar')
//    //compile fileTree(dir: 'libs', include: '*.jar')
//
//    compile fileTree(dir: 'libs', include: ['*.jar'])
}