mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
Under AGP 8 the CI 'build' task runs lintDebug as fatal. After the JDK 21 / Gradle 8.14.3 / AGP 8.7.3 migration this surfaced several blockers that the old Fastlane assembleRelease path never ran lint against. Google Play SDK Index (RiskyLibrary): - play-services-maps 12.0.1 is flagged as outdated and blocks publishing. Split the shared play_services version variable into per-artifact versions (maps/location/vision) so modules can diverge, and bump maps to 17.0.1 (its minSdk floor is still 14, so no app needs a higher minSdk). - Move play-services out of the shared library: it now exposes vision only (the shared QR/barcode scanner). maps goes to Buoy Pinger (the only app with a real map UI); location goes to Race Manager (WindFragment); the dead play-services-gcm declaration is dropped from the tracking app. - Race Manager no longer depends on maps: AppPreferences stored a wind position as com.google.android.gms.maps.model.LatLng purely as a (double,double) holder. Replace it with the existing domain type com.sap.sse.common.Position / com.sap.sse.common.impl.DegreePosition. targetSdk 35 runtime-correctness (local lint checks, not Play Console gates): - TrackingFragment: register the GPS-disabled receiver with RECEIVER_NOT_EXPORTED on API 33+ (guarded native flag; androidx.core 1.0.0 lacks the ContextCompat overload), suppressing UnspecifiedRegisterReceiverFlag. - TrackingService: scope the gpsDisabled broadcast to this app's package so it reaches the now non-exported receiver (fixes UnsafeImplicitIntentLaunch). - RaceStateService / RaceLogPollingService: guard setExact with canScheduleExactAlarms() on API 31+, falling back to inexact set(). - RaceStateService: declare POST_NOTIFICATIONS and guard the notify() update with a runtime permission check on API 33+. MissingInflatedId false positives: the referenced ids live in qualified layout variants (e.g. race_schedule_start_time_normal.xml) that lint cannot resolve from R.layout.race_schedule_start_time; suppress MissingInflatedId on the three affected onCreateView methods. Verified: ./gradlew lintDebug assembleRelease (JDK 21) and the CI gate ./gradlew build (JDK 17) both BUILD SUCCESSFUL with 0 fatal lint errors; all three apps' apk/.version artifacts regenerate. Assisted-By: Claude Opus 4.8