plugins {
    id 'com.android.application'
}

android {
    namespace 'com.linsheng.FATJS'
    compileSdk 34

    defaultConfig {
        applicationId "com.linsheng.FATJS"
        minSdk 26
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        ndk {
            //noinspection ChromeOsAbiSupport
            abiFilters "arm64-v8a" // 只编译生成64位so
        }
    }

    buildTypes {
        release {
            minifyEnabled false // 暂不支持代码混淆，不然javet会出问题
            //proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            proguardFiles 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
            version '3.22.1'
        }
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    compileOnly (fileTree(dir: "libs", include: ["*.jar", "*.aar"]))

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
    implementation 'androidx.navigation:navigation-fragment:2.4.1'
    implementation 'androidx.navigation:navigation-ui:2.4.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation 'com.caoccao.javet:javet-android:3.0.0' // Android (arm, arm64, x86 and x86_64)
    implementation 'com.github.getActivity:XXPermissions:18.3' // 权限请求框架：https://github.com/getActivity/XXPermissions
    implementation("com.squareup.okhttp3:okhttp:4.12.0") // okhttp3
    implementation 'com.google.code.gson:gson:2.10.1' // gson
    implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.9' // Android_CN_OAID
    implementation 'com.google.android.gms:play-services-ads-identifier:18.1.0'  // Google Play
    implementation 'it.sauronsoftware.cron4j:cron4j:2.2.5' // Cron4j
}