Skip to content

Conversation

@jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Oct 31, 2025

Description

One Line Summary

Update project to Kotlin 1.9 (from 1.7)

Details

Motivation

Kotlin 1.7 is pretty out of date now, and some new libraries (such as the Otel Java client) require Kotlin 1.9.

Scope

Just the minimum requirements to update to build with Kotlin 1.9.

Testing

Unit testing

N/A - No new tests are needed.

Manual testing

Ensured the Example app builds and runs on an Android 14 emulator.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

Copy link
Contributor

@abdulraqeeb33 abdulraqeeb33 left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Just an open question and if we want to write a test around synchronization around that method

return result!!
}

@Synchronized
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to place a sync block inside the method?

Copy link
Member Author

Choose a reason for hiding this comment

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

Kotlin 1.9 treats a function having both @Synchronized and suspend as an error now.

From what I can tell @Synchronized was never needed here, it won't be called twice and none of the other implementations account for this, FCM and ADM.

@jkasten2 jkasten2 merged commit a507911 into main Oct 31, 2025
1 of 3 checks passed
@jkasten2 jkasten2 deleted the kotlin1.9-update branch October 31, 2025 20:13
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.

4 participants