plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.kotlin.compose)
}

android {
    namespace 'net.artificialworlds.rabbitescape'
    compileSdk 34

    flavorDimensions "price"
    productFlavors {
        paid {
            applicationId "net.artificialworlds.rabbitescape"
            resValue "string", "app_name", "Rabbit Escape"
            manifestPlaceholders = [
                appIcon: "@drawable/ic_launcher"
            ]
        }
        free {
            applicationId "net.artificialworlds.rabbitescapefree"
            resValue "string", "app_name", "Rabbit Escape Free"
            manifestPlaceholders = [
                appIcon: "@drawable/ic_launcher_free"
            ]
        }
    }

    defaultConfig {
        minSdk 14
        targetSdk 34
        versionCode 134
        versionName "0.13.4"
    }

    signingConfigs {
        release {
            storeFile file( "/home/andy/Nextcloud/Andy/apk-key-store/keystore.jks" )
            storePassword System.getenv( "KEY_STORE_PASSWORD" )
            keyAlias "andybalaam"
            keyPassword System.getenv( "KEY_PASSWORD" )
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildFeatures {
        compose true
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation libs.appcompat.v7
    implementation files('libs/rabbit-escape-generic.jar')
}
