Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Android 15 #250

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Add support for Android 15 #250

wants to merge 15 commits into from

Conversation

kelsos
Copy link
Collaborator

@kelsos kelsos commented Dec 30, 2024

Fixes #

Proposed Changes

  • Update support for Android 15
  • Handle all deprecation warnings
  • Remove/Migrate outdated or old dependencies
    • Butterknife
    • RxJava -> Coroutines
    • Toothpick -> Koin
    • DBFlow -> Room
    • Threetenbp
    • Picasso -> Coil
    • Jackson -> Moshi
  • Introduce Detekt/linting baselines

Some of the changes can be backported from the develop branch

updates targetSdk to 35, removes butterknife
deals with api deprecations
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 6.44077% with 3617 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@fbe7a4e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...kelsos/mbrc/networking/protocol/ProtocolActions.kt 0.00% 221 Missing ⚠️
app/src/main/java/com/kelsos/mbrc/AppModule.kt 0.00% 159 Missing ⚠️
.../mbrc/networking/client/ClientConnectionManager.kt 0.00% 113 Missing ⚠️
...rc/platform/mediasession/AppNotificationManager.kt 0.00% 101 Missing ⚠️
...brc/networking/discovery/RemoteServiceDiscovery.kt 0.00% 79 Missing ⚠️
...mbrc/platform/mediasession/RemoteSessionManager.kt 0.00% 75 Missing ⚠️
...ava/com/kelsos/mbrc/features/queue/QueueHandler.kt 0.00% 74 Missing ⚠️
...lsos/mbrc/features/nowplaying/NowPlayingAdapter.kt 0.00% 68 Missing ⚠️
...om/kelsos/mbrc/networking/client/MessageHandler.kt 0.00% 67 Missing ⚠️
...lsos/mbrc/features/output/OutputSelectionDialog.kt 0.00% 65 Missing ⚠️
... and 171 more
Additional details and impacted files
@@          Coverage Diff           @@
##             main    #250   +/-   ##
======================================
  Coverage        ?   6.21%           
======================================
  Files           ?     195           
  Lines           ?    4198           
  Branches        ?     575           
======================================
  Hits            ?     261           
  Misses          ?    3895           
  Partials        ?      42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

}

val selectedOutput = availableOutputs.adapter.getItem(position) as String
viewModel.setOutput(selectedOutput)

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method getViewModel of class OutputSelectionDialog requires synthetic accessor

override fun onDragComplete() {
swipeRefreshLayout.isEnabled = true
viewModel.move()

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method getViewModel of class NowPlayingActivity requires synthetic accessor
) : ProtocolAction {
override suspend fun execute(message: ProtocolMessage) {
val previousState = appState.playerStatus.firstOrNull() ?: PlayerStatusModel()
appState.playerStatus.emit(previousState.copy(scrobbling = message.asBoolean()))

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method asBoolean of class ProtocolActionsKt requires synthetic accessor
) : ProtocolAction {
override suspend fun execute(message: ProtocolMessage) {
val previousState = appState.playerStatus.firstOrNull() ?: PlayerStatusModel()
appState.playerStatus.emit(previousState.copy(mute = message.asBoolean()))

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method asBoolean of class ProtocolActionsKt requires synthetic accessor
reportedVersion: String,
suggestedVersion: String,
): Boolean {
val currentVersion = reportedVersion.toVersionArray()

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method toVersionArray of class PluginUpdateCheckUseCaseKt requires synthetic accessor
suggestedVersion: String,
): Boolean {
val currentVersion = reportedVersion.toVersionArray()
val latestVersion = suggestedVersion.toVersionArray()

Check warning

Code scanning / Android Lint

Synthetic Accessor Warning

Access to private method toVersionArray of class PluginUpdateCheckUseCaseKt requires synthetic accessor
@kelsos kelsos force-pushed the update/1.6.0 branch 3 times, most recently from c0d23f5 to f1c591b Compare January 7, 2025 21:25
getItem(position)?.let { settings ->
holder.computerName.text = settings.name
holder.hostname.text = settings.address
holder.portNum.text = settings.port.toString()

Check warning

Code scanning / Android Lint

TextView Internationalization Warning

Number formatting does not take into account locale settings. Consider using String.format instead.
hostEdit.setText(settings.address)

if (settings.port > 0) {
portEdit.setText(settings.port.toString())

Check warning

Code scanning / Android Lint

TextView Internationalization Warning

Number formatting does not take into account locale settings. Consider using String.format instead.
@kelsos kelsos force-pushed the update/1.6.0 branch 2 times, most recently from 547334e to ba4e198 Compare January 9, 2025 20:07
desugar = "2.1.4"
firebaseBom = "33.7.0"
google-material = "1.12.0"
gradlePlugin-agp = "8.7.3"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.application than 8.7.3 is available: 8.8.0
desugar = "2.1.4"
firebaseBom = "33.7.0"
google-material = "1.12.0"
gradlePlugin-agp = "8.7.3"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.application than 8.7.3 is available: 8.8.0
desugar = "2.1.4"
firebaseBom = "33.7.0"
google-material = "1.12.0"
gradlePlugin-agp = "8.7.3"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.library than 8.7.3 is available: 8.8.0
desugar = "2.1.4"
firebaseBom = "33.7.0"
google-material = "1.12.0"
gradlePlugin-agp = "8.7.3"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.library than 8.7.3 is available: 8.8.0
Finishes migration from dbflow to room keeping the schema,
Also includes the jackson to moshi migration to drop reflection,
drops the last remaining usages of rxjava, and finalizes
migration from mvp to mvvm.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

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.

1 participant