adamint / spotify-web-api-kotlin

Spotify Web API wrapper for Kotlin, Java, JS, and Native - Targets JVM, Android, JS (browser), Native (Desktop), and Apple tvOS/iOS. Includes a Spotify Web Playback SDK wrapper for Kotlin/JS, and a spotify-auth wrapper for Kotlin/Android.
https://adamint.github.io/spotify-web-api-kotlin-docs/
MIT License
197 stars 22 forks source link

Changed function signiture in androidx.activity:activity-compose #338

Open techmaved opened 5 months ago

techmaved commented 5 months ago

Describe the bug The onNewIntent method on AbstractSpotifyPkceLoginActivity allows a nullable intent.

To Reproduce Steps to reproduce the behavior:

  1. update androidx.activity:activity-compose to version 1.9.0 from 1.8.2
  2. build android project
  3. See error

    Inherited platform declarations clash: The following declarations have the same JVM signature (onNewIntent(Landroid/content/Intent;)V):
    
    fun onNewIntent(intent: Intent):
    fun onNewIntent(intent: Intent?):

Expected behavior Android project builds

Additional context This failing build is related to the new source of ComponentActivity in androidx.activity:activity-compose See 1.8.2

@CallSuper
    @Override
    protected void onNewIntent(
            @SuppressLint({"UnknownNullness", "MissingNullability"}) Intent intent
    ) {
        super.onNewIntent(intent);
        for (Consumer<Intent> listener : mOnNewIntentListeners) {
            listener.accept(intent);
        }
    }

See 1.9.0

@CallSuper
    override fun onNewIntent(
        @Suppress("InvalidNullabilityOverride")
        intent: Intent
    ) {
        super.onNewIntent(intent)
        for (listener in onNewIntentListeners) {
            listener.accept(intent)
        }
    }