weather: reconcile canonical packages and imports (util->domain/platform, map->domain/map)
- Commit
686a3e875b66ed2bd9bab5dfc8f4feb069ca81c9- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-15 18:36 UTC (3 months ago)
- Parents
a30d8cc
Reconciles the stalled takeover: the working tree already has the canonical package bodies (domain/, platform/, widget/glance/, data/) but every file still shows as modified because HEAD carries the old packages (util/, map/, glance/). Update package declarations + every intra-module import per plan section 2.3 — litmus-test split (pure Kotlin -> domain/, Android- coupled/context/WorkManager/ViewModel -> platform/) plus the singleton mappings (map -> domain/map, glance at root banned -> widget/glance/). Also fix cross-cutting imports that still point at util/ or map/ (HomePage, LocationsScreen, WeatherMapPage, WeatherViewModel, SystemUnits stubs, Om* tiles, WmoCode, etc.), pin the manifest receivers and backupAgent to .widget.glance.* / .platform.*, sweep data/WeatherRefreshWorker and data/WeatherCacheStore/WeatherDatabase docrefs off util/, and update screenshotTest/MetadataPreviews to domain/ + platform/. Removes the two now-empty banned roots map/ and util/ at com.vayunmathur.weather so only allowed roots [data, domain, platform, network, intents, ui, widget] remain. Next: validate_changes + get_diagnostics then single :weather:assembleDev build per guardrails.
Diff
weather/src/main/AndroidManifest.xml
diff --git a/weather/src/main/AndroidManifest.xml b/weather/src/main/AndroidManifest.xmlindex 536dee0277..14a42b745d 100644--- a/weather/src/main/AndroidManifest.xml+++ b/weather/src/main/AndroidManifest.xml@@ -20,7 +20,7 @@ <application android:allowBackup="true"- android:backupAgent=".util.AppBackupAgent"+ android:backupAgent=".platform.AppBackupAgent" android:dataExtractionRules="@xml/data_extraction_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name"@@ -50,7 +50,7 @@ <!-- Glance widget receiver --> <receiver- android:name=".glance.WeatherGlanceWidgetReceiver"+ android:name=".widget.glance.WeatherGlanceWidgetReceiver" android:exported="false"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />@@ -61,7 +61,7 @@ </receiver> <!-- Blob widget — organic dark shape with large temp, matches homescreen reference --> <receiver- android:name=".glance.WeatherBlobGlanceWidgetReceiver"+ android:name=".widget.glance.WeatherBlobGlanceWidgetReceiver" android:exported="false"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
weather/src/main/java/com/vayunmathur/weather/data/WeatherCacheStore.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherCacheStore.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherCacheStore.ktindex 8e260573a3..d724b4b946 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherCacheStore.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherCacheStore.kt@@ -2,7 +2,7 @@ package com.vayunmathur.weather.data import com.vayunmathur.weather.network.AirQualityResponse import com.vayunmathur.weather.network.ForecastResponse-import com.vayunmathur.weather.util.roundCoord+import com.vayunmathur.weather.domain.roundCoord import kotlinx.serialization.json.Json /** Shared lenient JSON used for (de)serializing cached weather payloads. */
weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.ktindex 4aec863bb1..502f405599 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt@@ -9,7 +9,7 @@ import com.vayunmathur.library.util.DatabaseMigrations const val DB_NAME = "weather-db" -/** Backup config shared by [com.vayunmathur.weather.util.AppBackupAgent]. */+/** Backup config shared by [com.vayunmathur.weather.platform.AppBackupAgent]. */ fun weatherDbConfigs(context: Context): List<Pair<String, String>> = listOf(DB_NAME to DatabaseHelper(context).getPassphrase())
weather/src/main/java/com/vayunmathur/weather/data/WeatherRefreshWorker.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherRefreshWorker.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherRefreshWorker.ktindex dc03732614..eea2a15f2c 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherRefreshWorker.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherRefreshWorker.kt@@ -8,8 +8,8 @@ import androidx.work.ExistingPeriodicWorkPolicy import androidx.work.PeriodicWorkRequestBuilder import androidx.work.WorkManager import androidx.work.WorkerParameters-import com.vayunmathur.weather.glance.WeatherBlobGlanceWidget-import com.vayunmathur.weather.glance.WeatherGlanceWidget+import com.vayunmathur.weather.widget.glance.WeatherBlobGlanceWidget+import com.vayunmathur.weather.widget.glance.WeatherGlanceWidget import com.vayunmathur.weather.network.WeatherApi import java.util.concurrent.TimeUnit
weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt b/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.ktindex 3cd7f257be..d5f9489512 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.domain import com.vayunmathur.library.ui.DateString import com.vayunmathur.library.util.localizedAmPmMarker
weather/src/main/java/com/vayunmathur/weather/domain/MetricSeries.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/MetricSeries.kt b/weather/src/main/java/com/vayunmathur/weather/domain/MetricSeries.ktindex 2a141de820..9f7728e4fb 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/MetricSeries.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/MetricSeries.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.domain import androidx.annotation.StringRes import androidx.compose.ui.graphics.Color
weather/src/main/java/com/vayunmathur/weather/domain/SelectedData.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/SelectedData.kt b/weather/src/main/java/com/vayunmathur/weather/domain/SelectedData.ktindex 72adf88bb4..424b76f54b 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/SelectedData.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/SelectedData.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.domain import com.vayunmathur.weather.network.Current import com.vayunmathur.weather.network.ForecastResponse
weather/src/main/java/com/vayunmathur/weather/domain/UnitFormat.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/UnitFormat.kt b/weather/src/main/java/com/vayunmathur/weather/domain/UnitFormat.ktindex 6d256aeb50..df3631b1f0 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/UnitFormat.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/UnitFormat.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.domain import java.util.Locale import kotlin.math.round
weather/src/main/java/com/vayunmathur/weather/domain/WmoCode.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/WmoCode.kt b/weather/src/main/java/com/vayunmathur/weather/domain/WmoCode.ktindex fe11368d7f..727451ad7c 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/WmoCode.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/WmoCode.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.domain import androidx.annotation.StringRes import com.vayunmathur.weather.R
weather/src/main/java/com/vayunmathur/weather/domain/map/OmColorize.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmColorize.kt b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmColorize.ktindex 8a8944bbf3..0ad6ef2a26 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmColorize.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmColorize.kt@@ -1,10 +1,10 @@-package com.vayunmathur.weather.map+package com.vayunmathur.weather.domain.map import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.graphics.toArgb import androidx.core.graphics.createBitmap-import com.vayunmathur.weather.util.ColorStop+import com.vayunmathur.weather.domain.ColorStop /** * Colorize a row-major [values] grid (`w × h`, from
weather/src/main/java/com/vayunmathur/weather/domain/map/OmDomains.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmDomains.kt b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmDomains.ktindex 5b0ac5e7a7..52a1e00672 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmDomains.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmDomains.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.map+package com.vayunmathur.weather.domain.map /** * Grid geometry for an Open-Meteo spatial model, mirroring the relevant fields
weather/src/main/java/com/vayunmathur/weather/domain/map/OmMapMetadata.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmMapMetadata.kt b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmMapMetadata.ktindex da4e1094e2..8e34c6e6fa 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmMapMetadata.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmMapMetadata.kt@@ -1,8 +1,8 @@-package com.vayunmathur.weather.map+package com.vayunmathur.weather.domain.map import com.vayunmathur.library.network.NetworkClient-import com.vayunmathur.weather.util.WeatherMetric-import com.vayunmathur.weather.util.openMeteoHourlyVar+import com.vayunmathur.weather.domain.WeatherMetric+import com.vayunmathur.weather.domain.openMeteoHourlyVar import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json
weather/src/main/java/com/vayunmathur/weather/domain/map/OmTilesNative.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmTilesNative.kt b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmTilesNative.ktindex 058b7eb126..7cb4871ff0 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/map/OmTilesNative.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/map/OmTilesNative.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.map+package com.vayunmathur.weather.domain.map /** * JNI bridge to the native Rust `.om` decoder (`libweather_om.so`, built from
weather/src/main/java/com/vayunmathur/weather/intents/GetWeatherIntent.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/intents/GetWeatherIntent.kt b/weather/src/main/java/com/vayunmathur/weather/intents/GetWeatherIntent.ktindex 0f069d44d8..e2a96203f4 100644--- a/weather/src/main/java/com/vayunmathur/weather/intents/GetWeatherIntent.kt+++ b/weather/src/main/java/com/vayunmathur/weather/intents/GetWeatherIntent.kt@@ -5,9 +5,9 @@ import com.vayunmathur.library.intents.weather.WeatherData import com.vayunmathur.library.util.AssistantIntent import com.vayunmathur.weather.network.ForecastResponse import com.vayunmathur.weather.network.WeatherApi-import com.vayunmathur.weather.util.compassDirection-import com.vayunmathur.weather.util.parseLocalIsoToEpochSec-import com.vayunmathur.weather.util.weatherConditionForCode+import com.vayunmathur.weather.domain.compassDirection+import com.vayunmathur.weather.domain.parseLocalIsoToEpochSec+import com.vayunmathur.weather.domain.weatherConditionForCode import kotlinx.serialization.InternalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.serializer
weather/src/main/java/com/vayunmathur/weather/platform/AppBackupAgent.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/AppBackupAgent.kt b/weather/src/main/java/com/vayunmathur/weather/platform/AppBackupAgent.ktindex ecae2caa4f..a0a09db1df 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/AppBackupAgent.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/AppBackupAgent.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import com.vayunmathur.library.room.SqlCipherDbCodec import com.vayunmathur.library.util.BaseBackupAgent
weather/src/main/java/com/vayunmathur/weather/platform/LocationProvider.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/LocationProvider.kt b/weather/src/main/java/com/vayunmathur/weather/platform/LocationProvider.ktindex b82107e514..aadc172b90 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/LocationProvider.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/LocationProvider.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import android.Manifest import android.annotation.SuppressLint
weather/src/main/java/com/vayunmathur/weather/platform/Precipitation.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/Precipitation.kt b/weather/src/main/java/com/vayunmathur/weather/platform/Precipitation.ktindex 7c368beca2..18a080fffd 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/Precipitation.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/Precipitation.kt@@ -1,7 +1,8 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import android.content.Context import com.vayunmathur.weather.R+import com.vayunmathur.weather.domain.parseLocalIsoToEpochSec import com.vayunmathur.weather.network.Minutely15 /**
weather/src/main/java/com/vayunmathur/weather/platform/Summary.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/Summary.kt b/weather/src/main/java/com/vayunmathur/weather/platform/Summary.ktindex 7958f0ed88..f6d90c56e1 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/Summary.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/Summary.kt@@ -1,7 +1,10 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import android.content.Context import com.vayunmathur.weather.R+import com.vayunmathur.weather.domain.TemperatureUnit+import com.vayunmathur.weather.domain.formatTemperatureCompact+import com.vayunmathur.weather.domain.weatherConditionForCode import com.vayunmathur.weather.network.ForecastResponse import java.util.Locale
weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt b/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.ktindex 772c64b824..99028f62ed 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import androidx.compose.runtime.Composable import androidx.compose.runtime.remember
weather/src/main/java/com/vayunmathur/weather/platform/WeatherUiContract.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/WeatherUiContract.kt b/weather/src/main/java/com/vayunmathur/weather/platform/WeatherUiContract.ktindex ac1a450906..511275196b 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/WeatherUiContract.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/WeatherUiContract.kt@@ -1,7 +1,8 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import androidx.compose.runtime.Composable import com.vayunmathur.weather.data.SavedLocation+import com.vayunmathur.weather.domain.TemperatureUnit import com.vayunmathur.weather.network.AirQualityCurrent import com.vayunmathur.weather.network.ForecastResponse
weather/src/main/java/com/vayunmathur/weather/platform/WeatherViewModel.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/WeatherViewModel.kt b/weather/src/main/java/com/vayunmathur/weather/platform/WeatherViewModel.ktindex 9f9cc26b66..18f67932e7 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/WeatherViewModel.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/WeatherViewModel.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.util+package com.vayunmathur.weather.platform import android.app.Application import androidx.lifecycle.AndroidViewModel@@ -11,7 +11,9 @@ import com.vayunmathur.weather.data.SavedLocation import com.vayunmathur.weather.data.WeatherRepository import com.vayunmathur.weather.data.WeatherRefreshWorker import com.vayunmathur.weather.data.weatherJson-import com.vayunmathur.weather.glance.WeatherGlanceWidget+import com.vayunmathur.weather.domain.SelectedDateOrTime+import com.vayunmathur.weather.domain.roundCoord+import com.vayunmathur.weather.widget.glance.WeatherGlanceWidget import com.vayunmathur.weather.network.AirQualityResponse import com.vayunmathur.weather.network.ForecastResponse import com.vayunmathur.weather.network.WeatherApi
weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt b/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.ktindex d6af18cd9f..5907e1c0e9 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt@@ -57,19 +57,19 @@ import com.vayunmathur.weather.ui.components.MetricGraphSheet import com.vayunmathur.weather.ui.components.SelectedDateTimeHeader import com.vayunmathur.weather.ui.components.SummaryCard import com.vayunmathur.weather.ui.components.WeatherBlocks-import com.vayunmathur.weather.util.DisplayUnits-import com.vayunmathur.weather.util.LocationUiState-import com.vayunmathur.weather.util.SelectedDateOrTime-import com.vayunmathur.weather.util.WeatherActions-import com.vayunmathur.weather.util.WeatherMetric-import com.vayunmathur.weather.util.WeatherViewModel-import com.vayunmathur.weather.util.formatHourAxisLabel-import com.vayunmathur.weather.util.metricSeries-import com.vayunmathur.weather.util.metricValueFormatter-import com.vayunmathur.weather.util.parseLocalIsoToEpochSec-import com.vayunmathur.weather.util.precipitationNowcast-import com.vayunmathur.weather.util.rememberDisplayUnits-import com.vayunmathur.weather.util.resolveConditions+import com.vayunmathur.weather.domain.DisplayUnits+import com.vayunmathur.weather.domain.LocationUiState+import com.vayunmathur.weather.domain.SelectedDateOrTime+import com.vayunmathur.weather.domain.WeatherMetric+import com.vayunmathur.weather.domain.formatHourAxisLabel+import com.vayunmathur.weather.domain.metricSeries+import com.vayunmathur.weather.domain.metricValueFormatter+import com.vayunmathur.weather.domain.parseLocalIsoToEpochSec+import com.vayunmathur.weather.domain.resolveConditions+import com.vayunmathur.weather.platform.WeatherActions+import com.vayunmathur.weather.platform.WeatherViewModel+import com.vayunmathur.weather.platform.precipitationNowcast+import com.vayunmathur.weather.platform.rememberDisplayUnits import kotlinx.coroutines.delay import kotlinx.coroutines.launch
weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.ktindex 191c273252..b375244713 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt@@ -73,13 +73,13 @@ import com.vayunmathur.weather.network.GeocodingResult import com.vayunmathur.weather.network.WeatherApi import com.vayunmathur.weather.ui.components.LocationItem import com.vayunmathur.weather.ui.components.UseDeviceLocationCard-import com.vayunmathur.weather.util.LocationProvider-import com.vayunmathur.weather.util.LocationRow-import com.vayunmathur.weather.util.LocationsUiState-import com.vayunmathur.weather.util.WeatherActions-import com.vayunmathur.weather.util.WeatherViewModel-import com.vayunmathur.weather.util.formatTemperatureCompact-import com.vayunmathur.weather.util.rememberTempUnit+import com.vayunmathur.weather.domain.formatTemperatureCompact+import com.vayunmathur.weather.platform.LocationProvider+import com.vayunmathur.weather.platform.LocationRow+import com.vayunmathur.weather.platform.LocationsUiState+import com.vayunmathur.weather.platform.WeatherActions+import com.vayunmathur.weather.platform.WeatherViewModel+import com.vayunmathur.weather.platform.rememberTempUnit import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.distinctUntilChanged@@ -388,7 +388,7 @@ fun LocationsScreen( /** * Opens the OS regional-units settings so the user can pick temperature/wind/etc. units. * The app itself stores no units config; it reads the system regional preferences (see- * [com.vayunmathur.weather.util.rememberTempUnit]). Falls back to the general locale settings+ * [com.vayunmathur.weather.platform.rememberTempUnit]). * on devices without a dedicated regional-preferences screen (pre-Android 14). */ private fun openRegionalUnitsSettings(context: Context) {
weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapPage.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapPage.kt b/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapPage.ktindex 8828359a39..d6144afe2d 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapPage.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapPage.kt@@ -45,22 +45,22 @@ import com.vayunmathur.weather.R import com.vayunmathur.weather.Route import com.vayunmathur.weather.network.RegionTimezone import com.vayunmathur.weather.network.WeatherApi-import com.vayunmathur.weather.map.DwdIconGlobal-import com.vayunmathur.weather.map.OmMapMetadata-import com.vayunmathur.weather.map.OmTilesNative-import com.vayunmathur.weather.map.colorizeToBitmap-import com.vayunmathur.weather.map.fetchOmMapMetadata-import com.vayunmathur.weather.map.omFileUrl-import com.vayunmathur.weather.map.omVariable-import com.vayunmathur.weather.util.WeatherMetric-import com.vayunmathur.weather.util.colorRamp-import com.vayunmathur.weather.util.formatInstantInZone-import com.vayunmathur.weather.util.mapMetrics-import com.vayunmathur.weather.util.metricValueFormatter-import com.vayunmathur.weather.util.rememberPressureUnit-import com.vayunmathur.weather.util.rememberTempUnit-import com.vayunmathur.weather.util.rememberUse24Hour-import com.vayunmathur.weather.util.rememberWindUnit+import com.vayunmathur.weather.domain.WeatherMetric+import com.vayunmathur.weather.domain.colorRamp+import com.vayunmathur.weather.domain.formatInstantInZone+import com.vayunmathur.weather.domain.map.DwdIconGlobal+import com.vayunmathur.weather.domain.map.OmMapMetadata+import com.vayunmathur.weather.domain.map.OmTilesNative+import com.vayunmathur.weather.domain.map.colorizeToBitmap+import com.vayunmathur.weather.domain.map.fetchOmMapMetadata+import com.vayunmathur.weather.domain.map.omFileUrl+import com.vayunmathur.weather.domain.map.omVariable+import com.vayunmathur.weather.domain.mapMetrics+import com.vayunmathur.weather.domain.metricValueFormatter+import com.vayunmathur.weather.platform.rememberPressureUnit+import com.vayunmathur.weather.platform.rememberTempUnit+import com.vayunmathur.weather.platform.rememberUse24Hour+import com.vayunmathur.weather.platform.rememberWindUnit import kotlin.math.abs import kotlin.math.roundToInt import kotlinx.coroutines.Dispatchers
weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidget.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidget.kt b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidget.ktindex b0ad8c58d3..793aee36b7 100644--- a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidget.kt+++ b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidget.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.glance+package com.vayunmathur.weather.widget.glance import android.content.Context import android.content.Intent@@ -37,8 +37,8 @@ import com.vayunmathur.weather.R import com.vayunmathur.weather.data.WeatherRepository import com.vayunmathur.weather.data.weatherJson import com.vayunmathur.weather.network.ForecastResponse-import com.vayunmathur.weather.util.roundCoord-import com.vayunmathur.weather.util.weatherConditionForCode+import com.vayunmathur.weather.domain.roundCoord+import com.vayunmathur.weather.domain.weatherConditionForCode import kotlin.math.max import kotlin.math.roundToInt
weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidgetReceiver.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidgetReceiver.kt b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidgetReceiver.ktindex 12544a6c64..dc37b14ea3 100644--- a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidgetReceiver.kt+++ b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherBlobGlanceWidgetReceiver.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.glance+package com.vayunmathur.weather.widget.glance import android.content.Context import androidx.glance.appwidget.GlanceAppWidgetReceiver
weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidget.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidget.kt b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidget.ktindex 0ccb2f49d8..77b4f7e0c1 100644--- a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidget.kt+++ b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidget.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.glance+package com.vayunmathur.weather.widget.glance import com.vayunmathur.library.util.DateNameStyle import android.content.Context@@ -40,8 +40,8 @@ import com.vayunmathur.weather.R import com.vayunmathur.weather.data.WeatherRepository import com.vayunmathur.weather.data.weatherJson import com.vayunmathur.weather.network.ForecastResponse-import com.vayunmathur.weather.util.roundCoord-import com.vayunmathur.weather.util.weatherConditionForCode+import com.vayunmathur.weather.domain.roundCoord+import com.vayunmathur.weather.domain.weatherConditionForCode import kotlinx.datetime.LocalDateTime import kotlinx.datetime.TimeZone import kotlinx.datetime.format
weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidgetReceiver.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidgetReceiver.kt b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidgetReceiver.ktindex 84617045a3..885796ef21 100644--- a/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidgetReceiver.kt+++ b/weather/src/main/java/com/vayunmathur/weather/widget/glance/WeatherGlanceWidgetReceiver.kt@@ -1,4 +1,4 @@-package com.vayunmathur.weather.glance+package com.vayunmathur.weather.widget.glance import android.content.Context import androidx.glance.appwidget.GlanceAppWidgetReceiver
weather/src/screenshotTest/kotlin/com/vayunmathur/weather/ui/MetadataPreviews.kt
diff --git a/weather/src/screenshotTest/kotlin/com/vayunmathur/weather/ui/MetadataPreviews.kt b/weather/src/screenshotTest/kotlin/com/vayunmathur/weather/ui/MetadataPreviews.ktindex d4197cd569..f189c6b541 100644--- a/weather/src/screenshotTest/kotlin/com/vayunmathur/weather/ui/MetadataPreviews.kt+++ b/weather/src/screenshotTest/kotlin/com/vayunmathur/weather/ui/MetadataPreviews.kt@@ -12,12 +12,12 @@ import com.vayunmathur.weather.network.Current import com.vayunmathur.weather.network.Daily import com.vayunmathur.weather.network.ForecastResponse import com.vayunmathur.weather.network.Hourly-import com.vayunmathur.weather.util.DisplayUnits-import com.vayunmathur.weather.util.LocationRow-import com.vayunmathur.weather.util.LocationUiState-import com.vayunmathur.weather.util.LocationsUiState-import com.vayunmathur.weather.util.SelectedDateOrTime-import com.vayunmathur.weather.util.WeatherActions+import com.vayunmathur.weather.domain.DisplayUnits+import com.vayunmathur.weather.domain.LocationRow+import com.vayunmathur.weather.domain.LocationUiState+import com.vayunmathur.weather.domain.LocationsUiState+import com.vayunmathur.weather.domain.SelectedDateOrTime+import com.vayunmathur.weather.platform.WeatherActions /** Phone-shaped, roughly 1080x2340 at xxhdpi — comfortably above the F-Droid minimum. */ private const val PHONE = "spec:width=411dp,height=891dp,dpi=420"