plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdk = 34
    buildToolsVersion = '34.0.0'
    // the android plugin has a bug that requires specifying ndkVersion in every module, even when unused
    // this version should match what is installed in the CI
    ndkVersion '25.2.9519653'
    namespace "uk.co.adventuregamestudio.agsplayer"

    defaultConfig {
        applicationId "uk.co.adventuregamestudio.agsplayer"
        minSdkVersion 19
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            // this uses debug keys on release so it can be installed on a phone
            // android blocks installation of unsigned apk
            // to auto generate this key, on a clean environment, run a debug build first
            signingConfig signingConfigs.debug
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    namespace 'uk.co.adventuregamestudio.agsplayer'
}

dependencies {
    // you can optionally use the runtime as a dependency instead of building the runtime project
    // implementation fileTree(include: ['*.aar'], dir: 'libs')
    // implementation files('libs/uk.co.adventuregamestudio.runtime.aar')
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation project(path: ':runtime')
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
