- Add signing config (reads from env vars) - Enable R8 minification and resource shrinking - Expand ProGuard rules for Gson - Update README with build instructions and Play Store checklist
76 lines
2.0 KiB
Kotlin
76 lines
2.0 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.itsh.tetherapi"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "dev.itsh.tetherapi"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0.0"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
val keystoreFile = file("../keystore.jks")
|
|
if (keystoreFile.exists()) {
|
|
storeFile = keystoreFile
|
|
storePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
|
|
keyAlias = System.getenv("KEY_ALIAS") ?: "release"
|
|
keyPassword = System.getenv("KEY_PASSWORD") ?: ""
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.findByName("release")
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.17.0")
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
implementation("com.google.android.material:material:1.12.0")
|
|
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
|
|
|
// NanoHTTPD for lightweight HTTP server
|
|
implementation("org.nanohttpd:nanohttpd:2.3.1")
|
|
|
|
// Kotlin coroutines
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
|
|
|
// JSON serialization
|
|
implementation("com.google.code.gson:gson:2.11.0")
|
|
|
|
// Preferences for settings
|
|
implementation("androidx.preference:preference-ktx:1.2.1")
|
|
}
|