apply plugin: 'com.android.application'

android {
    namespace 'com.ginkage.wearmouse'
    compileSdk 34

    defaultConfig {
        applicationId "com.ginkage.wearmouse"
        minSdkVersion 34
        targetSdkVersion 34
        versionCode 40
        versionName "1.27"
        externalNativeBuild {
            cmake {
                arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang"
                cppFlags.addAll([
                    "-std=c++11",
                    "-Os",
                    "-ffunction-sections",
                    "-fdata-sections",
                    "-fvisibility=hidden",
                ])
            }
        }
        ndk {
            abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
            stl "gnustl_static"
        }
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            proguardFiles 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_17
        sourceCompatibility JavaVersion.VERSION_17
    }
    lint {
        checkReleaseBuilds false
    }
    splits {
        abi {
            enable true
            reset()
            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
            universalApk true
        }
    }
    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    compileOnly 'com.google.android.wearable:wearable:2.9.0'
    implementation 'com.google.android.support:wearable:2.9.0'
    implementation 'com.google.guava:guava:31.1-android'
    implementation 'com.google.code.findbugs:jsr305:3.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.8.6'
    implementation 'androidx.wear:wear:1.3.0'
    implementation 'androidx.core:core-splashscreen:1.0.1'
}
