docs: CLAUDE.md — MET weather via shared met-weather library; bump example to 0.3.7
Some checks failed
Android Main Branch CI / Build, Sign & Upload (push) Has been cancelled
Update CHANGELOG.md / changelog (push) Has been cancelled
Validate Gradle Wrapper / Validation (push) Has been cancelled

This commit is contained in:
2026-08-20 13:00:10 +02:00
parent a42f913875
commit 553d1802c7

View File

@@ -38,7 +38,7 @@ export JAVA_HOME=~/jdk21 # Gradle 8.13, compileSdk/targetSdk 36, minSdk 2
## Release flow (see git history for the v0.3.x pattern)
1. Bump `versionCode`/`versionName` in `app/build.gradle.kts`
(currently 35 / 0.3.5).
(currently 37 / 0.3.7).
2. Build both flavors, then sign each:
```bash
@@ -46,9 +46,9 @@ PASS=$(cat ~/android-keystores/easylauncher-release.pass)
~/android-sdk/build-tools/36.0.0/apksigner sign --v4-signing-enabled true \
--ks ~/android-keystores/easylauncher-release.jks --ks-key-alias easylauncher \
--ks-pass "pass:$PASS" --key-pass "pass:$PASS" \
--out dist/EasyLauncher-Internet-v0.3.5-Signed.apk \
app/build/outputs/apk/withInternet/release/app.easy.launcher_v0.3.5-Release.apk
# repeat for withoutInternet -> dist/EasyLauncher-v0.3.5-Signed.apk
--out dist/EasyLauncher-Internet-v0.3.7-Signed.apk \
app/build/outputs/apk/withInternet/release/app.easy.launcher_v0.3.7-Release.apk
# repeat for withoutInternet -> dist/EasyLauncher-v0.3.7-Signed.apk
```
3. `apksigner verify --print-certs` should show the keystore SHA-256.
@@ -124,11 +124,17 @@ Prefs live in `/data/data/app.easy.launcher/shared_prefs/`. To change them:
### Home current-weather element (MET/Yr)
- Source: `https://api.met.no/weatherapi/locationforecast/2.0/compact` — **no API
key**, but REQUIRES a descriptive `User-Agent` header (see `MetApiService`).
Verified working from PC and phone network.
- `AppHelper.fetchMetWeather(context, lat, lon)` returns Celsius (rounded) +
MET `symbol_code`; 15-minute cache in `met_weather_prefs`.
- Fetched via the **shared `met-weather` library** (`dk.haugesenspil:met-weather`
from the Gitea maven registry, source in `~/sources/met-weather`):
`MetWeatherClient(`met-weather 0.1.0`)` hits
`https://api.met.no/weatherapi/locationforecast/2.0/compact` — **no API
key**, but REQUIRES a descriptive `User-Agent` header (passed in
`AppHelper.MET_USER_AGENT`). Same library feeds `met-weather-provider` and
therefore the GadgetBridge/Skagen watch.
- `AppHelper.fetchMetWeather(context, lat, lon)` (suspend) returns Celsius
(rounded) + MET `symbol_code` via `MetWeatherClient`; 15-minute cache in
`met_weather_prefs`. Bump `dk.haugesenspil:met-weather` version here when the
library is updated.
- The icon is a **Nerd Font weather glyph** (`nf-weather-*`, U+E300+ PUA),
mapped from the symbol code in `MetSymbolMapper`. It renders with the bundled
`R.font.jetbrains_mono_nf_weather` — a ~95KB fontTools subset of