Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.
Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
|
|
|
import java.util.Properties
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
|
alias(libs.plugins.kotlin.android)
|
|
|
|
|
alias(libs.plugins.kotlin.compose)
|
|
|
|
|
alias(libs.plugins.kotlin.serialization)
|
|
|
|
|
alias(libs.plugins.hilt.android)
|
|
|
|
|
alias(libs.plugins.ksp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val localProperties = Properties().apply {
|
|
|
|
|
val file = rootProject.file("local.properties")
|
|
|
|
|
if (file.exists()) {
|
|
|
|
|
file.inputStream().use { load(it) }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun localProp(key: String, default: String): String =
|
|
|
|
|
(localProperties.getProperty(key) ?: System.getenv(key) ?: default)
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace = "com.guidecity.app"
|
|
|
|
|
compileSdk = 34
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId = "com.guidecity.app"
|
|
|
|
|
minSdk = 26
|
|
|
|
|
targetSdk = 34
|
|
|
|
|
versionCode = 1
|
|
|
|
|
versionName = "0.1.0"
|
|
|
|
|
|
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
|
|
|
|
|
buildConfigField(
|
|
|
|
|
"String",
|
|
|
|
|
"DGIS_API_KEY",
|
|
|
|
|
"\"${localProp("DGIS_API_KEY", "")}\"",
|
|
|
|
|
)
|
|
|
|
|
buildConfigField(
|
|
|
|
|
"String",
|
|
|
|
|
"API_BASE_URL",
|
|
|
|
|
"\"${localProp("API_BASE_URL", "http://10.0.2.2:8000/")}\"",
|
|
|
|
|
)
|
2026-07-09 21:28:52 +00:00
|
|
|
|
|
|
|
|
// The 2GIS SDK ships native libs for every ABI, which balloons the APK
|
|
|
|
|
// (~19MB -> ~190MB unfiltered). Almost all real devices are arm64
|
|
|
|
|
// today, and this keeps debug builds small enough to send anywhere
|
|
|
|
|
// (e.g. under Telegram bot's 50MB upload limit).
|
|
|
|
|
ndk {
|
|
|
|
|
abiFilters += "arm64-v8a"
|
|
|
|
|
}
|
Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.
Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = "17"
|
|
|
|
|
freeCompilerArgs += listOf(
|
|
|
|
|
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
compose = true
|
|
|
|
|
buildConfig = true
|
|
|
|
|
}
|
2026-07-09 20:10:31 +00:00
|
|
|
|
|
|
|
|
testOptions {
|
|
|
|
|
unitTests {
|
|
|
|
|
// Production code calls android.util.Log for observability; without this,
|
|
|
|
|
// the Android stub jar throws on every such call in plain JVM unit tests.
|
|
|
|
|
isReturnDefaultValues = true
|
|
|
|
|
}
|
|
|
|
|
}
|
Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.
Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
|
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
|
|
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
|
|
|
implementation(libs.androidx.ui)
|
|
|
|
|
implementation(libs.androidx.ui.graphics)
|
|
|
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
|
|
|
implementation(libs.androidx.material3)
|
|
|
|
|
implementation(libs.androidx.material.icons.extended)
|
|
|
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
|
|
|
|
|
|
|
|
implementation(libs.hilt.android)
|
|
|
|
|
ksp(libs.hilt.compiler)
|
|
|
|
|
implementation(libs.hilt.navigation.compose)
|
|
|
|
|
|
|
|
|
|
implementation(libs.retrofit.core)
|
|
|
|
|
implementation(libs.retrofit.kotlinx.serialization.converter)
|
|
|
|
|
implementation(libs.okhttp.logging.interceptor)
|
|
|
|
|
implementation(libs.kotlinx.serialization.json)
|
|
|
|
|
|
|
|
|
|
implementation(libs.androidx.room.runtime)
|
|
|
|
|
implementation(libs.androidx.room.ktx)
|
|
|
|
|
ksp(libs.androidx.room.compiler)
|
|
|
|
|
|
|
|
|
|
implementation(libs.androidx.datastore.preferences)
|
|
|
|
|
|
|
|
|
|
implementation(libs.play.services.location)
|
|
|
|
|
implementation(libs.kotlinx.coroutines.play.services)
|
|
|
|
|
|
2026-07-09 21:28:52 +00:00
|
|
|
// 2GIS MapKit SDK. Requires a real dgissdk.key in app/src/main/assets/,
|
|
|
|
|
// obtained per-app from dev.2gis.com — see README for details. Without
|
|
|
|
|
// it, DgisSdkProvider's init fails gracefully and DgisMapView falls back
|
|
|
|
|
// to its placeholder rendering.
|
|
|
|
|
implementation(libs.dgis.sdk.map)
|
|
|
|
|
implementation(libs.dgis.compose.map)
|
Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.
Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
|
|
|
|
|
|
|
|
testImplementation(libs.junit)
|
2026-07-09 20:10:31 +00:00
|
|
|
testImplementation(libs.mockk)
|
|
|
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
Add Android app skeleton (Kotlin/Compose, Catppuccin Mocha theme)
Full app scaffold wired to the backend: onboarding, content-length
picker, map screen (permission flow + text-search fallback), guide
screen with a swipeable place-card stack driven by on-device TTS
narration and a 60s re-scan loop, place detail screen with
mute/favorite controls, favorites (Room-backed), and settings.
Hilt for DI, Retrofit+kotlinx.serialization for the API client,
DataStore for onboarding/content-length prefs, FusedLocationProviderClient
for location. The 2GIS MapKit integration is isolated behind
map/DgisMapView.kt (currently a placeholder) since its exact Maven
coordinates need confirming from the 2GIS developer portal.
Verified by actually building it: installed a minimal Android SDK
(platform 34 + build-tools, no emulator) and JDK 17 locally, then ran
:app:compileDebugKotlin, :app:assembleDebug (produced a real debug
APK), and :app:lintDebug (0 errors, 44 non-blocking warnings, mostly
"newer dependency version available"). Caught and fixed two real bugs
this way: a wrong Maven artifact for the Retrofit kotlinx.serialization
converter, and missing ExperimentalMaterial3Api opt-in.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 19:05:49 +00:00
|
|
|
androidTestImplementation(libs.androidx.test.ext.junit)
|
|
|
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
|
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
|
|
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
|
|
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
|
|
|
|
}
|