apply plugin: 'com.android.application'
//这里是本人的签名配置，运行前请去掉
/*
Properties props = new Properties()
props.load(new FileInputStream(file("../local.properties")))
*/

android {
    /*signingConfigs {
        release {
            keyAlias props['KEY_ALIAS']
            keyPassword props['KEY_PASSWORD']
            storeFile file(props['KEYSTORE_FILE'])
            storePassword props['KEYSTORE_PASSWORD']
        }
    }*/

    compileSdkVersion 30

    defaultConfig {
        applicationId "site.duqian.so.loader"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 8
        versionName "1.8"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

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

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
    sourceSets {
        main {
            jni.srcDirs = ['src/main/jni', 'src/main/jni/']
            jniLibs.srcDirs = ['libs']
            res.srcDirs = ['src/main/res', 'src/main/res/xml']
        }
    }

    externalNativeBuild {
        cmake {
            path file('CMakeLists.txt')
        }
    }
    buildTypes {
        debug {
            //minifyEnabled true
            proguardFiles 'proguard-rules.pro'
            //signingConfig signingConfigs.release
        }
        release {
            //minifyEnabled true
            proguardFiles 'proguard-rules.pro'
            //signingConfig signingConfigs.release
        }
    }

    bundle {
        abi {
            enableSplit = true
        }
        density {
            enableSplit = false
        }
        language {
            enableSplit = false
        }
    }
    //dynamicFeatures = [":dynamic_feature"]
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'com.getkeepsafe.relinker:relinker:1.3.1'
    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    implementation 'com.tencent.bugly:crashreport:3.2.2'
    implementation 'com.tencent.bugly:nativecrashreport:3.7.3'
}
