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

android {
    enableKotlin = false
    namespace = 'dk.bearware.gui'
    compileSdk {
        version = release(36)
    }
    buildToolsVersion = '36.1.0'
    ndkVersion = '29.0.14206865'

    defaultConfig {
        applicationId = 'dk.bearware.gui'
        minSdk = 21
        targetSdk = 36
        versionCode = 150
        versionName = '5.22'

        testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
    }

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

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

    buildFeatures {
        buildConfig = true
        viewBinding = true
    }

    androidResources {
        generateLocaleConfig = true
    }

    splits {
        abi {
            enable = true
            reset()
            include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
            universalApk = true
        }
    }

    lint {
        disable 'MissingTranslation'
    }
}

dependencies {
    coreLibraryDesugaring libs.desugar.jdk.libs
    implementation libs.gson
    implementation libs.androidx.annotation
    implementation libs.androidx.appcompat
    implementation libs.androidx.core
    implementation libs.androidx.fragment
    implementation libs.androidx.media
    implementation libs.androidx.preference
    implementation libs.androidx.viewpager
    implementation libs.material
    implementation files('libs/TeamTalk5.jar')

    testImplementation libs.junit
    testImplementation files('libs/TeamTalk5Test.jar')

    androidTestImplementation libs.androidx.test.core
    androidTestImplementation libs.androidx.test.runner
    androidTestImplementation libs.androidx.test.rules
    androidTestImplementation files('libs/TeamTalk5Test.jar')
}
