Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / weather / build.gradle.kts
build.gradle.kts57 lines · 1.9 KiBRaw
| 1 | plugins { |
| 2 | id("common-conventions-app") |
| 3 | // Listing screenshots come from Compose previews (src/screenshotTest), not from an |
| 4 | // instrumented test on a device. Same `:weather:metadata` task name either way. |
| 5 | id("common-conventions-preview-metadata") |
| 6 | alias(libs.plugins.ksp) |
| 7 | } |
| 8 | |
| 9 | launcherIcon { |
| 10 | symbol = "partly_cloudy_day" |
| 11 | } |
| 12 | |
| 13 | android { |
| 14 | defaultConfig { |
| 15 | applicationId = "com.vayunmathur.weather" |
| 16 | } |
| 17 | |
| 18 | androidResources { |
| 19 | // The places database asset is already brotli-compressed by |
| 20 | // scripts/generate_places_db.py. Letting AAPT deflate it again costs |
| 21 | // build time, gains nothing, and makes the app pay a second inflate |
| 22 | // pass on top of its own when unpacking it. |
| 23 | noCompress += "br" |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | androidComponents { |
| 28 | onVariants { variant -> |
| 29 | variant.sources.jniLibs?.addStaticSourceDirectory( |
| 30 | layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath |
| 31 | ) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // Native `.om` weather-file decoder (Rust). See weather/src/main/rust/. |
| 36 | rustNativeLib("weather_om", "weather") |
| 37 | |
| 38 | dependencies { |
| 39 | implementation(project(":library:network")) |
| 40 | implementation(project(":library:widgets")) |
| 41 | implementation(libs.androidx.datastore.preferences) |
| 42 | implementation(project(":library:map")) |
| 43 | implementRoom(libs) |
| 44 | implementation(project(":library:room")) |
| 45 | |
| 46 | // Decodes the brotli-compressed places database asset. This is the only |
| 47 | // reason the app links a codec at all; it does not use the network. |
| 48 | implementation(libs.brotli.dec) |
| 49 | |
| 50 | // Android Auto (WEATHER): AndroidX Car App Library. `app` provides the |
| 51 | // CarAppService/Session/Screen/template model. Only pulled into the car |
| 52 | // code path (service/car/) — the phone UI is untouched. |
| 53 | implementation(libs.androidx.car.app) |
| 54 | |
| 55 | // Car-view store-listing screenshots render through the shared host renderer. |
| 56 | add("screenshotTestImplementation", project(":library:carhost")) |
| 57 | } |