apply plugin: 'com.android.application'

def keystorePropertiesFile = file("Keystore/keystore.properties")
def keystoreProperties = null
if (keystorePropertiesFile.canRead()) {
    keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
    buildFeatures {
        buildConfig true
    }
    signingConfigs {
        release {

        }
    }
    compileSdk 35
    defaultConfig {
        applicationId "io.github.doubi88.slideshowwallpaper"
        minSdkVersion 21
        targetSdk 35
        versionCode 13
        versionName '1.2.4'
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
        debug {
            signingConfig signingConfigs.release
        }
    }
    productFlavors {
    }
    namespace 'io.github.doubi88.slideshowwallpaper'
    dependenciesInfo {
        includeInApk false
        includeInBundle false
    }

    applicationVariants.configureEach { variant ->
        variant.resValue "string", "versionName", variant.versionName
    }
}

if (keystoreProperties != null) {
    android.signingConfigs.release.keyAlias keystoreProperties['keyAlias']
    android.signingConfigs.release.keyPassword keystoreProperties['keyPassword']
    android.signingConfigs.release.storeFile file(keystoreProperties['storeFile'])
    android.signingConfigs.release.storePassword keystoreProperties['storePassword']
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.7.1'
    implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.material:material:1.12.0'
    implementation 'androidx.exifinterface:exifinterface:1.4.1'
}
