Files
android-tether-api/app/build.gradle.kts
Giovanni Harting 017172f48a Initial commit: Android Tether API app
Exposes phone connection status via HTTP API for tethered devices.

Features:
- Auto-start/stop server when tethering is enabled/disabled
- REST API with /status and /health endpoints
- Connection type, signal strength, carrier, battery info
- Foreground service with persistent notification

Stack: Kotlin 2.3, AGP 8.13, Gradle 8.13, compileSdk 36
2025-12-18 21:08:56 +01:00

62 lines
1.5 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"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
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")
}