plugins {
    id 'com.android.application'
}

android {
    namespace 'com.helldivers.app'
    compileSdk 34

    defaultConfig {
        applicationId "com.helldivers.app"
        minSdk 18
        targetSdk 34
        versionCode 1
        versionName "1.0.0-LIBERTY"
        multiDexEnabled true
    }

    signingConfigs {
        release {
            storeFile file(System.getenv("ANDROIDKEYSTOREPATH") ?: "helldivers.keystore")
            storePassword System.getenv("ANDROIDKEYSTOREPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
            keyAlias System.getenv("ANDROIDKEYALIAS") ?: "helldivers"
            keyPassword System.getenv("ANDROIDKEYPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
        }
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
        coreLibraryDesugaringEnabled true
    }

    buildFeatures {
        buildConfig true
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.multidex:multidex:2.0.1'

    // ZXing core only - lightweight QR generation
    implementation 'com.google.zxing:core:3.5.3'
}