plugins {
    id 'com.android.application'
}

android {
    compileSdk 35
    ndkVersion '26.0.10792818'

    defaultConfig {
        applicationId "mw.gri.android"
        minSdk 24
        targetSdk 35
        versionCode 4
        versionName "0.2.4"
    }

    def keystorePropertiesFile = rootProject.file("keystore.properties")
    def keystoreProperties = new Properties()
    if (keystorePropertiesFile.exists()) {
        keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

        signingConfigs {
            release {
                keyAlias keystoreProperties['keyAlias']
                keyPassword keystoreProperties['keyPassword']
                storeFile file(keystoreProperties['storeFile'])
                storePassword keystoreProperties['storePassword']
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        if (keystorePropertiesFile.exists()) {
            signedRelease {
                initWith release
                signingConfig signingConfigs.release
            }
        }
        debug {
            minifyEnabled false
            debuggable true
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    namespace 'mw.gri.android'
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.7.0'

    // Android Camera
    implementation 'androidx.camera:camera-core:1.4.2'
    implementation 'androidx.camera:camera-camera2:1.4.2'
    implementation 'androidx.camera:camera-lifecycle:1.4.2'
}

