@file:Suppress("UnstableApiUsage") plugins { id("com.android.application") id("org.jetbrains.kotlin.android") kotlin("kapt") id("com.google.dagger.hilt.android") } android { namespace = "emu.cosmic" compileSdk = 34 defaultConfig { applicationId = "emu.cosmic" minSdk = 31 targetSdk = 34 versionCode = 20 versionName = "0.0.20" ndk { abiFilters.clear() abiFilters.add("arm64-v8a") } } buildTypes { getByName("release") { isDebuggable = false isMinifyEnabled = true isShrinkResources = false externalNativeBuild { cmake { arguments += listOf("-DCMAKE_BUILD_TYPE=Release", "-DANDROID_STL=c++_shared") } } proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") signingConfig = signingConfigs.findByName("debug") } getByName("debug") { isDebuggable = true isMinifyEnabled = false isShrinkResources = false externalNativeBuild { cmake { arguments += listOf("-DCMAKE_BUILD_TYPE=Debug", "-DANDROID_STL=c++_shared") } } } flavorDimensions += "version" productFlavors { create("prod") { dimension = "version" manifestPlaceholders += mutableMapOf("appLabel" to "Cosmic") } create("dev") { dimension = "version" applicationIdSuffix = ".dev" versionNameSuffix = "-dev" manifestPlaceholders += mutableMapOf("appLabel" to "Cosmic Dev") } } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } ndkVersion = "26.1.10909125" externalNativeBuild { cmake { path = file("src/main/CMakeLists.txt") version = "3.22.1" } } buildFeatures { viewBinding = true } buildToolsVersion = "34.0.0" } dependencies { implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.7.0") implementation("androidx.preference:preference-ktx:1.2.1") implementation("androidx.datastore:datastore-preferences:1.1.1") implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("com.google.android.material:material:1.12.0") implementation("com.google.code.gson:gson:2.11.0") implementation("com.google.dagger:hilt-android:2.51.1") kapt("com.google.dagger:hilt-android-compiler:2.51.1") } kapt { correctErrorTypes = true }