Skip to content

Commit

Permalink
Bump firebase-messaging to 24.0.0
Browse files Browse the repository at this point in the history
firebase-messaging has always included play-services-base but in 24.0.0
they changed this to runtime. This means we needed to start including
`play-services-base` in our `build.gradle`, however we are doing so as
`compileOnly` so we don't upgrade or downgrade the version in the customer's
app.
  • Loading branch information
jkasten2 committed Jul 16, 2024
1 parent 918c0eb commit f276378
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions OneSignalSDK/onesignal/notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,22 @@ dependencies {

compileOnly('com.amazon.device:amazon-appstore-sdk:[3.0.1, 3.0.99]')

// firebase-messaging:21.0.0 introduces FirebaseMessaging.getToken API
// firebase-messaging:23.0.0 incoporates fix for SecurityException: Not allowed to bind to service
// NOTE: firebase-messaging:24.0.0 requires customer's project to use
// compileSdkVersion 34 or higher.
api('com.google.firebase:firebase-messaging') {
version {
require '[21.0.0, 23.4.99]'
prefer '23.4.0'
require '[23.0.8, 24.0.99]'
prefer '24.0.0'
}
}
// Needed for GoogleApiAvailability
// Using compileOnly as firebase-messaging already includes this as a
// runtime dependency and we don't want to change what version is used in
// the customer's app. (firebase-messaging:24.0.0 is when this dependency
// changed to runtime)
// NOTE: If you change the firebase-messaging version you may need to
// bump this version if you get a compile error when building the SDK.
compileOnly('com.google.android.gms:play-services-base:18.0.1')

// Huawei PushKit
// KEEP as "compileOnly", so OneSignal isn't a direct dependency in the POM file.
Expand Down

0 comments on commit f276378

Please sign in to comment.