Skip to content

Update library versions with required code migrations#427

Merged
hossain-khan merged 7 commits into
mainfrom
copilot/update-library-versions
Apr 6, 2026
Merged

Update library versions with required code migrations#427
hossain-khan merged 7 commits into
mainfrom
copilot/update-library-versions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Bumps all library versions to their latest targets as specified, with required code migrations for Metro 0.13.1, Compose BOM 2026.03.01, and Kotlinter 5.4.2.

Version Updates (gradle/libs.versions.toml)

  • Metro 0.8.0 → 0.13.1, Circuit 0.30.0 → 0.33.1, Kotlin 2.2.20 → 2.3.20, KSP 2.2.20-2.0.4 → 2.3.6
  • OkHttp 4.12.0 → 5.3.2, Compose BOM 2025.06.00 → 2026.03.01, AGP 8.13.0 → 8.13.2
  • activityCompose, coreKtx, dataStore, firebaseBom, lifecycleRuntimeKtx, roomDb, workManager, and others per the issue

Required Migrations

Gradle wrapper → 9.4.1 — Metro 0.12.0+ requires Gradle 9+ and JVM 21+

app/build.gradle.kts

  • Reordered plugins: kotlin-android must be applied before metro (Metro 0.13.x requires the Kotlin extension to exist at plugin-apply time)
  • compileSdk 35 → 36 — required by activity:1.13.0 and core-ktx:1.18.0
  • Added explicit material-icons-extended dependency — no longer transitively available in the new Compose BOM

ActivityKey.kt — Metro 0.12.0+ requires all @MapKey annotations to declare AnnotationTarget.FUNCTION:

// Before
@Target(AnnotationTarget.CLASS)
@MapKey
annotation class ActivityKey(val value: KClass<out Activity>)

// After
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@MapKey
annotation class ActivityKey(val value: KClass<out Activity>)

Code formatting — Applied formatKotlin for two new Kotlinter 5.4.2 rules: blank-line-between-when-conditions and when-entry-bracing.

…tp 5.3.2, Kotlin 2.3.20, and many more

- Update all library versions in gradle/libs.versions.toml
- Upgrade Gradle wrapper to 9.4.1 (required by Metro 0.12.0+)
- Reorder plugins in app/build.gradle.kts so kotlin-android applies before metro
- Update compileSdk from 35 to 36 (required by activity 1.13.0 and core-ktx 1.18.0)
- Add material-icons-extended dependency (no longer transitively available)
- Fix ActivityKey.kt to add AnnotationTarget.FUNCTION (required by Metro 0.12.0+)
- Remove @ContributesIntoSet + @nAmed from 6 notifier classes (unused named multibindings warned by Metro 0.11.2+)
- Auto-format code with formatKotlin to fix stricter Kotlinter 5.4.2 rules

Agent-Logs-Url: https://github.com/hossain-khan/android-remote-notify/sessions/6ba9881b-0063-451e-88b1-dee5ccd26e06

Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update library versions and migrate code where necessary Update library versions with required code migrations Apr 6, 2026
Copilot AI requested a review from hossain-khan April 6, 2026 12:39
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Code Coverage Report

View Coverage Report

```
FAILURE: Build failed with an exception.
[Incubating] Problems report is available at: file:///home/runner/work/android-remote-notify/android-remote-notify/build/reports/problems/problems-report.html

* What went wrong:
A problem occurred configuring root project 'Remote Notify'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not resolve dev.zacsweers.metro:gradle-plugin:0.13.1.
     Required by:
         buildscript of root project 'Remote Notify' > dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin:0.13.1
      > Dependency requires at least JVM runtime version 21. This build uses a Java 17 JVM.

```
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

📊 APK Size Analysis

Comparing maincopilot/update-library-versions (this PR)

OLD: base.apk (signature: V2)
NEW: app-release.apk (signature: V2)

          │             compressed             │            uncompressed            
          ├───────────┬───────────┬────────────┼───────────┬───────────┬────────────
 APK      │ old       │ new       │ diff       │ old       │ new       │ diff       
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
      dex │   6.5 MiB │   6.9 MiB │ +452.5 KiB │   6.5 MiB │   6.9 MiB │ +452.5 KiB 
     arsc │ 429.8 KiB │ 434.4 KiB │   +4.6 KiB │ 429.7 KiB │ 434.3 KiB │   +4.6 KiB 
 manifest │   3.6 KiB │   3.7 KiB │      +64 B │  16.4 KiB │  16.8 KiB │     +428 B 
      res │ 160.8 KiB │ 160.8 KiB │       -1 B │ 198.5 KiB │ 198.5 KiB │        0 B 
   native │  60.1 KiB │  73.1 KiB │    +13 KiB │  58.9 KiB │  71.9 KiB │    +13 KiB 
    asset │   6.7 KiB │  49.5 KiB │  +42.8 KiB │   6.4 KiB │ 137.2 KiB │ +130.8 KiB 
    other │   106 KiB │  74.7 KiB │  -31.4 KiB │ 172.4 KiB │ 155.4 KiB │    -17 KiB 
──────────┼───────────┼───────────┼────────────┼───────────┼───────────┼────────────
    total │   7.2 MiB │   7.7 MiB │ +481.6 KiB │   7.3 MiB │   7.9 MiB │ +584.2 KiB 

 DEX     │ old   │ new   │ diff                  
─────────┼───────┼───────┼───────────────────────
   files │     1 │     1 │     0                 
 strings │ 34125 │ 35650 │ +1525 (+6306 -4781)   
   types │  8979 │  9583 │  +604 (+4344 -3740)   
 classes │  7681 │  8206 │  +525 (+3910 -3385)   
 methods │ 41450 │ 44026 │ +2576 (+32946 -30370) 
  fields │ 24684 │ 26382 │ +1698 (+21904 -20206) 

 ARSC    │ old │ new │ diff         
─────────┼─────┼─────┼──────────────
 configs │ 109 │ 109 │   0          
 entries │ 392 │ 424 │ +32 (+35 -3)
APK
       compressed       │      uncompressed      │                                                                                   
───────────┬────────────┼───────────┬────────────┤                                                                                   
 size      │ diff       │ size      │ diff       │ path                                                                              
───────────┼────────────┼───────────┼────────────┼───────────────────────────────────────────────────────────────────────────────────
   6.9 MiB │ +452.5 KiB │   6.9 MiB │ +452.5 KiB │ ∆ classes.dex                                                                     
  41.6 KiB │  +41.6 KiB │ 129.6 KiB │ +129.6 KiB │ + assets/PublicSuffixDatabase.list                                                
           │  -40.6 KiB │           │  -40.4 KiB │ - okhttp3/internal/publicsuffix/publicsuffixes.gz                                 
 434.4 KiB │   +4.6 KiB │ 434.3 KiB │   +4.6 KiB │ ∆ resources.arsc                                                                  
   8.4 KiB │   +3.9 KiB │   8.2 KiB │   +3.9 KiB │ ∆ lib/armeabi-v7a/libdatastore_shared_counter.so                                  
   3.7 KiB │   +3.7 KiB │   9.9 KiB │   +9.9 KiB │ + META-INF/androidx/datastore/datastore-preferences-proto/LICENSE.txt             
   3.7 KiB │   +3.7 KiB │   9.9 KiB │   +9.9 KiB │ + META-INF/androidx/datastore/datastore-core-okio/LICENSE.txt                     
  10.3 KiB │   +3.2 KiB │  10.1 KiB │   +3.2 KiB │ ∆ lib/arm64-v8a/libdatastore_shared_counter.so                                    
   9.4 KiB │   +3.1 KiB │   9.2 KiB │   +3.1 KiB │ ∆ lib/x86_64/libdatastore_shared_counter.so                                       
   7.9 KiB │   +2.8 KiB │   7.8 KiB │   +2.8 KiB │ ∆ lib/x86/libdatastore_shared_counter.so                                          
   6.9 KiB │     +1 KiB │   6.8 KiB │     +1 KiB │ ∆ assets/dexopt/baseline.prof                                                     
     974 B │     +974 B │   1.4 KiB │   +1.4 KiB │ + META-INF/androidx/datastore/datastore-preferences-external-protobuf/LICENSE.txt 
     882 B │     +882 B │   2.4 KiB │   +2.4 KiB │ + res/6f.xml                                                                      
           │     -881 B │           │   -2.4 KiB │ - res/xN.xml                                                                      
     632 B │     +632 B │   1.2 KiB │   +1.2 KiB │ + res/eG.xml                                                                      
           │     -632 B │           │   -1.2 KiB │ - res/a0.xml                                                                      
     581 B │     +581 B │     1 KiB │     +1 KiB │ + res/SN.xml                                                                      
           │     -581 B │           │     -1 KiB │ - res/S8.xml                                                                      
     563 B │     +563 B │   1.2 KiB │   +1.2 KiB │ + res/W3.xml                                                                      
           │     -563 B │           │   -1.2 KiB │ - res/Ws.xml                                                                      
     515 B │     +515 B │     988 B │     +988 B │ + res/rJ.xml                                                                      
           │     -515 B │           │     -988 B │ - res/iQ.xml                                                                      
     305 B │     +305 B │     144 B │     +144 B │ + META-INF/native-image/okhttp/okhttp/native-image.properties                     
           │     -297 B │           │     -218 B │ - okhttp3/internal/publicsuffix/NOTICE                                            
     216 B │     +216 B │       6 B │       +6 B │ + META-INF/androidx.compose.material_material-icons-extended.version              
     214 B │     +214 B │       6 B │       +6 B │ + META-INF/androidx.navigationevent_navigationevent-compose.version               
           │     -210 B │           │      -88 B │ - META-INF/ui_release.kotlin_module                                               
     202 B │     +202 B │       6 B │       +6 B │ + META-INF/androidx.dynamicanimation_dynamicanimation.version                     
     198 B │     +198 B │       6 B │       +6 B │ + META-INF/androidx.navigationevent_navigationevent.version                       
     197 B │     +197 B │       7 B │       +7 B │ + META-INF/androidx.compose
...✂
MANIFEST
@@ -1,4 +1,4 @@
 <manifest
-    android:compileSdkVersion="35"
-    android:compileSdkVersionCodename="15"
+    android:compileSdkVersion="36"
+    android:compileSdkVersionCodename="16"
     android:versionCode="21"
@@ -6,4 +6,4 @@
     package="dev.hossain.remotenotify"
-    platformBuildVersionCode="35"
-    platformBuildVersionName="15"
+    platformBuildVersionCode="36"
+    platformBuildVersionName="16"
     xmlns:android="http://schemas.android.com/apk/res/android"
@@ -24,2 +24,5 @@
   <uses-permission
+      android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"
+      />
+  <uses-permission
       android:name="com.google.android.gms.permission.AD_ID"
@@ -33,5 +36,2 @@
   <uses-permission
-      android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"
-      />
-  <uses-permission
       android:name="android.permission.RECEIVE_BOOT_COMPLETED"
@@ -96,4 +96,24 @@
           />
+      <meta-data
+          android:name="okhttp3.internal.platform.PlatformInitializer"
+          android:value="androidx.startup"
+          />
     </provider>
+    <receiver
+        android:enabled="true"
+        android:exported="false"
+        android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
+        />
     <service
+        android:enabled="true"
+        android:exported="false"
+        android:name="com.google.android.gms.measurement.AppMeasurementService"
+        />
+    <service
+        android:enabled="true"
+        android:exported="false"
+        android:name="com.google.android.gms.measurement.AppMeasurementJobService"
+        android:permission="android.permission.BIND_JOB_SERVICE"
+        />
+    <service
         android:directBootAware="true"
@@ -103,3 +123,3 @@
       <meta-data
-          android:name="com.google.firebase.components:com.google.firebase.crashlytics.FirebaseCrashlyticsKtxRegistrar"
+          android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
           android:value="com.google.firebase.components.ComponentRegistrar"
@@ -107,3 +127,3 @@
       <meta-data
-          android:name="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar"
+          android:name="com.google.firebase.components:com.google.firebase.crashlytics.FirebaseCrashlyticsKtxRegistrar"
           android:value="com.google.firebase.components.ComponentRegistrar"
@@ -111,3 +131,3 @@
       <meta-data
-          android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
+          android:name="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar"
           android:value="com.google.firebase.components.ComponentRegistrar"
@@ -135,2 +155,7 @@
     </service>
+    <service
+        android:enabled="false"
+        android:exported="false"
+        android:name="com.google.firebase.sessions.SessionLifecycleService"
+        />
     <provider
@@ -142,18 +167,2 @@
         />
-    <receiver
-        android:enabled="true"
-        android:exported="false"
-        android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
-        />
-    <service
-        android:enabled="true"
-        android:exported="false"
-        android:name="com.google.android.gms.measurement.AppMeasurementService"
-        />
-    <service
-        android:enabled="true"
-        android:exported="false"
-        android:name="com.google.android.gms.measurement.AppMeasurementJobService"
-        android:permission="android.permission.BIND_JOB_SERVICE"
-        />
     <activity
@@ -207,7 +216,2 @@
     </receiver>
-    <service
-        android:directBootAware="true"
-        android:exported="false"
-        android:name="androidx.room.MultiInstanceInvalidationService"
-        />
     <activity
@@ -263,5 +267,6 @@
         />
-    <meta-data
-        android:name="com.google.android.gms.version"
-        android:value="@integer/google_play_services_version"
+    <service
+        android:directBootAware="true"
+        android:exported="false"
+        android:name="androidx.room.MultiInstanceInvalidationService"
         />
@@ -295,2 +300,6 @@
     </receiver>
+    <meta-data
+        android:name="com.google.android.gms.version"
+        android:value="@integer/google_play_services_version"
+        />
     <service
DEX
STRINGS:

   old   │ new   │ diff                
  ───────┼───────┼─────────────────────
   34125 │ 35650 │ +1525 (+6306 -4781) 
  
  +

import java.util.Locale

@ContributesIntoSet(AppScope::class)
@Named("discord")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("discord") are restored.

* - https://documentation.mailgun.com/en/latest/api-sending.html#sending
*/
@ContributesIntoSet(AppScope::class)
@Named("email")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("email") are restored.

import timber.log.Timber

@ContributesIntoSet(AppScope::class)
@Named("slack")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("slack") are restored.

import timber.log.Timber

@ContributesIntoSet(AppScope::class)
@Named("telegram") // Could not use `NotifierType.TELEGRAM.name` as it's not a constant.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("telegram") are restored.

import timber.log.Timber

@ContributesIntoSet(AppScope::class)
@Named("twilio")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("twilio") are restored.

import timber.log.Timber

@ContributesIntoSet(AppScope::class)
@Named("webhook")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in 85f4411@ContributesIntoSet(AppScope::class) and @Named("webhook") are restored.

Copilot AI requested a review from hossain-khan April 6, 2026 13:59
@hossain-khan hossain-khan marked this pull request as ready for review April 6, 2026 14:05
The @nAmed annotations were contributing each sender to separate named
sets (e.g. @nAmed("email") Set<NotificationSender>) that nothing in the
graph consumed, triggering Metro's SuspiciousUnusedMultibinding warning.

Senders are already bound to the plain Set<NotificationSender> via
NotificationSenderMultibindings, and are identified at runtime by their
notifierType property, so the qualifiers were redundant.
@hossain-khan hossain-khan merged commit 65c480f into main Apr 6, 2026
4 checks passed
@hossain-khan hossain-khan deleted the copilot/update-library-versions branch April 6, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update library versions - migrate code for libraries update where necessary

2 participants