plugins {
    id 'com.android.application'
}

android {
    lint {
        baseline = file("lint-baseline.xml")
    }
    signingConfigs {
        config {
            keyAlias 'key0'
            keyPassword '123456'
            storeFile file('../minijvm_key.jks')
            storePassword '123456'
        }
    }
    compileSdkVersion 34
    defaultConfig {
        applicationId "org.minijvm.activity"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0.7"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }

        ndk {
            abiFilters "armeabi-v7a"
            abiFilters "arm64-v8a"
            abiFilters "x86"
            abiFilters "x86_64"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
        debug {
            signingConfig signingConfigs.config
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
    sourceSets.main {
        assets.srcDirs = ["../../assets/"]
    }
    ndkVersion '27.0.12077973'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    api 'com.alipay.sdk:alipaysdk-android:+@aar'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
