plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
}

android {
    compileSdk 36

    defaultConfig {
        def versionMajor = 1
        def versionMinor = 5
        def versionPatch = 0
        def versionBuild = 3
        def versionSuffix = "" // """-BETA"

        applicationId "org.dsandler.apps.markers"
        minSdk 21
        targetSdk 34
        versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild

        versionName "${versionMajor}.${versionMinor}.${versionPatch}${versionSuffix} (build ${versionBuild})"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
    }

    buildTypes {
        debug {
            minifyEnabled false
            manifestPlaceholders = [
                    debug: "true",
                    appName: "Markers (Debug)"
            ]
        }
        release {
            minifyEnabled true
            shrinkResources true
            manifestPlaceholders = [
                    debug: "false",
                    appName: "@string/app_name"
            ]
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        compose true
    }
    composeOptions {
        // must match plugin id 'org.jetbrains.kotlin.android' version in this table:
        // https://developer.android.com/jetpack/androidx/releases/compose-kotlin
        kotlinCompilerExtensionVersion = "1.5.8"
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
    namespace 'org.dsandler.apps.markers'
}

dependencies {

    implementation 'androidx.core:core-ktx:1.12.0'
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
    implementation 'androidx.activity:activity-compose:1.8.2'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
    debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
    debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
}