67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
fun resolveConfig(name: String): String? {
|
|
return (project.findProperty(name) as String?)?.takeIf { it.isNotBlank() }
|
|
?: System.getenv(name)?.takeIf { it.isNotBlank() }
|
|
}
|
|
|
|
android {
|
|
namespace = "com.cyjai.agent"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "com.cyjai.agent"
|
|
minSdk = 24
|
|
targetSdk = 35
|
|
versionCode = 12
|
|
versionName = "1.0.10"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
val storeFilePath = resolveConfig("ANDROID_KEYSTORE_PATH")
|
|
val storePass = resolveConfig("ANDROID_KEYSTORE_PASSWORD")
|
|
val keyAliasValue = resolveConfig("ANDROID_KEY_ALIAS")
|
|
val keyPass = resolveConfig("ANDROID_KEY_PASSWORD")
|
|
|
|
if (!storeFilePath.isNullOrBlank()) {
|
|
storeFile = file(storeFilePath)
|
|
}
|
|
storePassword = storePass
|
|
keyAlias = keyAliasValue
|
|
keyPassword = keyPass
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
signingConfig = signingConfigs.getByName("release")
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.13.1")
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
implementation("com.google.android.material:material:1.12.0")
|
|
implementation("androidx.activity:activity-ktx:1.9.2")
|
|
}
|