Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / networklocation / build.gradle.kts

build.gradle.kts46 lines · 1.9 KiBRaw
1plugins {
2 id("common-conventions-app")
3}
4
5launcherIcon {
6 symbol = "my_location"
7}
8
9android {
10 defaultConfig {
11 applicationId = "com.vayunmathur.networklocation"
12 }
13}
14
15androidComponents {
16 onVariants { variant ->
17 variant.sources.jniLibs?.addStaticSourceDirectory(
18 layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath
19 )
20 }
21}
22
23// Native code for this module, loaded as libnetworklocation.so: RANSAC + EM multilateration
24// device-position estimation over the resolved beacon fixes, AND the offline geocoder
25// search over geocoder.db. Both live in networklocation/src/main/rust/.
26rustNativeLib("networklocation")
27
28// The offline databases (geocoder.db, wifi.wpsdb up to ~2 GB, cells.wpsdb far
29// smaller) are NOT bundled. Shipping them as assets put a 3.5 GB APK in the MAOS system image,
30// which pushed the factory install zip past fastboot's 4 GiB zip limit. They are downloaded to
31// device-protected storage on request instead — see OfflineDatabases.kt. Until they arrive every
32// lookup misses, which the readers already treat as "no data": beacons stay unresolved and no
33// position is reported, and the geocoder reports itself unavailable.
34
35dependencies {
36 // Compile-only stubs for the framework's unbundled provider API (com.android.location.provider).
37 // Provided at runtime by <uses-library>; must NOT be packaged.
38 compileOnly(project(":library:locationprovider"))
39 // Reporting loop + IO for the offline database fetch.
40 implementation(libs.kotlinx.coroutines.android)
41 // Resumable, checksummed, unmetered-only fetch of the offline databases, which are no
42 // longer bundled (see OfflineDatabases). Also supplies the progress UI on the status screen.
43 implementation(project(":library:downloadservice"))
44 // The offline geocoder search runs natively (Rust/ruzstd) over geocoder.db; there is no
45 // Kotlin-side DB code, so no zstd-jni / serialization deps are needed here.
46}