Skip to content

Update all included dependencies#12776

Merged
Stypox merged 7 commits intodevfrom
depUpdate
Nov 26, 2025
Merged

Update all included dependencies#12776
Stypox merged 7 commits intodevfrom
depUpdate

Conversation

@theimpulson
Copy link
Copy Markdown
Member

@theimpulson theimpulson commented Nov 8, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Updates all possible dependencies to their latest stable release
  • Turns on new Gradle configuration cache

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions Bot added the size/medium PRs with less than 250 changed lines label Nov 8, 2025
@theimpulson
Copy link
Copy Markdown
Member Author

I will make a separate PR to enable new ktlint rules as well as to enable android's default lint which is currently set to ignore errors.

@theimpulson
Copy link
Copy Markdown
Member Author

Some of the dependencies updated here such as kotlin are already updated in refactor branch but not all. I am hoping to have all dependencies on latest stable release as they might contain fixes for compose, kotlin or ksp in general.

@TobiGr TobiGr added the dependency Issues and PRs related to dependencies label Nov 8, 2025
@theimpulson theimpulson requested a review from Stypox November 9, 2025 09:27
@theimpulson theimpulson force-pushed the depUpdate branch 2 times, most recently from 1aea837 to 16b21f0 Compare November 15, 2025 03:13
Copy link
Copy Markdown
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Usually when we do dependency updates we try to look into the changelogs to make sure there are no regressions, I left a comment about this below.


Uff what a shame that androidx is dropping support for API 21... we can keep an outdated library for some time, but we'll have to switch at some point I guess. We'll lose 0.6% of devices (see below) when bumping to API 23 (or possibly more since many users install newpipe on old phones). For now, please add a comment to the two versions that we can't update in libs.versions.toml, so we don't forget.

Image

I tested the debug APK for some time and everything seems to still work, except for a subtle bug: when importing a database which contains a channel group feed in the main page, its icon turns into three dots. This does not happen on nightly.

Image

Comment thread app/build.gradle.kts
Comment thread app/src/main/java/org/schabi/newpipe/database/history/dao/HistoryDAO.kt Outdated
Comment thread gradle/libs.versions.toml
@github-actions github-actions Bot added size/large PRs with less than 750 changed lines and removed size/medium PRs with less than 250 changed lines labels Nov 17, 2025
@theimpulson
Copy link
Copy Markdown
Member Author

For now, please add a comment to the two versions that we can't update in libs.versions.toml, so we don't forget.

Done. I think we can bump up the minSdk after the next release to import compose libs as that has more frequent releases every month and are part of androidx framework too which will make it a blocker.

I tested the debug APK for some time and everything seems to still work, except for a subtle bug: when importing a database which contains a channel group feed in the main page, its icon turns into three dots. This does not happen on nightly.

I am unable to reproduce this on my side. is it possible to change the feed icon manually? Maybe there is something related to that?

@theimpulson
Copy link
Copy Markdown
Member Author

I noticed a crash during exporting database due to checkpoint being called on main thread so made a commit to fix that. This probably should have been part of the database migration to kotlin PR.

@theimpulson
Copy link
Copy Markdown
Member Author

Marking as draft to allow database related fixes go first to avoid polluting this PR

@theimpulson theimpulson marked this pull request as draft November 18, 2025 02:00
@theimpulson theimpulson mentioned this pull request Nov 18, 2025
5 tasks
@github-actions github-actions Bot added size/medium PRs with less than 250 changed lines and removed size/large PRs with less than 750 changed lines labels Nov 18, 2025
@theimpulson theimpulson marked this pull request as ready for review November 18, 2025 13:53
@theimpulson theimpulson requested a review from Stypox November 18, 2025 13:53
@Stypox
Copy link
Copy Markdown
Member

Stypox commented Nov 18, 2025

I think we can bump up the minSdk after the next release to import compose libs as that has more frequent releases every month and are part of androidx framework too which will make it a blocker.

I'd say let's not bump it as long as it doesn't start creating problems, so we can keep supporting those users for a bit longer

@Stypox
Copy link
Copy Markdown
Member

Stypox commented Nov 18, 2025

I am unable to reproduce this on my side. is it possible to change the feed icon manually? Maybe there is something related to that?

Ah I see, when a feed group tab gets created, its icon is saved to disk as the drawable resource ID (see here). The changes in this PR likely changed the IDs, hence the problem when importing data from older versions. Since every FeedGroupIcon has a unique ID, we should have save that instead of the drawable ID. We have two options to solve this issue:

  • creating a SettingsMigration that reads all main screen tabs (R.string.saved_tabs_key) and uses the FeedGroupTab.feedGroupId to read the corresponding feed group in the DB and obtain its icon ID again, except that this time the unique icon ID is saved back in the tab information instead of the drawable ID. Then when showing the tab we need to look through the FeedGroupIcons to find the corresponding drawable ID. We also need to adapt the tab creation code.
  • dropping the iconId field completely from the FeedGroupTab and instead reading the icon ID from the database using feedGroupId every time in getTabIconRes(). This would eliminate the redundant information (which becomes outdated if one changes a feed group icon), but may be difficult to implement since getTabIconRes() is not suspend.

This can be done in a separate PR but needs to be done before the release.

Copy link
Copy Markdown
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Other than the feed group icons LGTM, let's see if users report any other problem before the release. Thank you!

@theimpulson theimpulson marked this pull request as draft November 20, 2025 09:52
@theimpulson theimpulson force-pushed the depUpdate branch 3 times, most recently from f7c9556 to 55ce204 Compare November 20, 2025 10:01
@theimpulson theimpulson marked this pull request as ready for review November 20, 2025 10:02
Comment thread .kotlin/sessions/kotlin-compiler-4222484878062452975.salive Outdated
Also update the wrapper using the ./gradlew wrapper command

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
androidx has bumped minSdk to API 23 which makes us unable to use latest version of:
* room
* workmanager

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Fixes build errors after Gradle 9.x upgrade

Ref: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Disable all new rules to avoid massive file-changes. All new rules should be
enabled one by one as per requirements in separate commit to make review easier.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
@theimpulson
Copy link
Copy Markdown
Member Author

I rebased to update Gradle version to 9.2.1 and removed the kotlin compiler generated files. The build errors are now due to jitpack behaving weird as always, probably can be ignored.

@theimpulson
Copy link
Copy Markdown
Member Author

Since every FeedGroupIcon has a unique ID, we should have save that instead of the drawable ID.

It seems to me that we are already doing that here and mapping it properly as well.

@theimpulson
Copy link
Copy Markdown
Member Author

theimpulson commented Nov 21, 2025

I see a different error in logcat but the icon is properly loaded in my case regardless even after exporting and importing database from current dev to this one.

2025-11-21 20:39:05.462  6431-6431  ResourcesCompat         org.schabi.newpipe.debug.depUpdate   W  Failed to inflate ColorStateList, leaving it to the framework
                                                                                                    java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f04012b a=-1}, theme={InheritanceMap=[id=0x7f130177org.schabi.newpipe.debug.depUpdate:style/LightDialogMinWidthTheme, id=0x7f1302ddorg.schabi.newpipe.debug.depUpdate:style/Theme.AppCompat.DayNight.Dialog.MinWidth, id=0x7f1302e9org.schabi.newpipe.debug.depUpdate:style/Theme.AppCompat.Light.Dialog.MinWidth, id=0x7f13005dorg.schabi.newpipe.debug.depUpdate:style/Base.Theme.AppCompat.Light.Dialog.MinWidth, id=0x7f13005aorg.schabi.newpipe.debug.depUpdate:style/Base.Theme.AppCompat.Light.Dialog, id=0x7f1300aeorg.schabi.newpipe.debug.depUpdate:style/Base.V21.Theme.AppCompat.Light.Dialog, id=0x7f1300d2org.schabi.newpipe.debug.depUpdate:style/Base.V7.Theme.AppCompat.Light.Dialog, id=0x7f130058org.schabi.newpipe.debug.depUpdate:style/Base.Theme.AppCompat.Light, id=0x7f1300c6org.schabi.newpipe.debug.depUpdate:style/Base.V28.Theme.AppCompat.Light, id=0x7f1300bforg.schabi.newpipe.debug.depUpdate:style/Base.V26.Theme.AppCompat.Light, id=0x7f1300b9org.schabi.newpipe.debug.depUpdate:style/Base.V23.Theme.AppCompat.Light, id=0x7f1300b7org.schabi.newpipe.debug.depUpdate:style/Base.V22.Theme.AppCompat.Light, id=0x7f1300adorg.schabi.newpipe.debug.depUpdate:style/Base.V21.Theme.AppCompat.Light, id=0x7f1300d1org.schabi.newpipe.debug.depUpdate:style/Base.V7.Theme.AppCompat.Light, id=0x7f13019eorg.schabi.newpipe.debug.depUpdate:style/Platform.AppCompat.Light, id=0x7f1301a9org.schabi.newpipe.debug.depUpdate:style/Platform.V25.AppCompat.Light, id=0x1030241android:style/Theme.Material.Light.NoActionBar, id=0x1030237android:style/Theme.Material.Light, id=0x103000candroid:style/Theme.Light, id=0x1030005android:style/Theme], Themes=[org.schabi.newpipe.debug.depUpdate:style/LightDialogMinWidthTheme, forced, org.schabi.newpipe.debug.depUpdate:style/PreferenceThemeOverlay, not forced, org.schabi.newpipe.debug.depUpdate:style/LightSettingsTheme, forced, org.schabi.newpipe.debug.depUpdate:style/OpeningTheme, forced, org.schabi.newpipe.debug.depUpdate:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
                                                                                                    	at android.content.res.TypedArray.getColor(TypedArray.java:536)
                                                                                                    	at androidx.core.content.res.ColorStateListInflaterCompat.inflate(ColorStateListInflaterCompat.java:157)
                                                                                                    	at androidx.core.content.res.ColorStateListInflaterCompat.createFromXmlInner(ColorStateListInflaterCompat.java:122)
                                                                                                    	at androidx.core.content.res.ColorStateListInflaterCompat.createFromXml(ColorStateListInflaterCompat.java:102)
                                                                                                    	at androidx.core.content.res.ResourcesCompat.inflateColorStateList(ResourcesCompat.java:259)
                                                                                                    	at androidx.core.content.res.ResourcesCompat.getColorStateList(ResourcesCompat.java:234)
                                                                                                    	at androidx.core.content.ContextCompat.getColorStateList(ContextCompat.java:516)
                                                                                                    	at androidx.appcompat.content.res.AppCompatResources.getColorStateList(AppCompatResources.java:46)
                                                                                                    	at com.google.android.material.resources.MaterialResources.getColorStateList(MaterialResources.java:64)
                                                                                                    	at com.google.android.material.imageview.ShapeableImageView.<init>(ShapeableImageView.java:110)
                                                                                                    	at com.google.android.material.imageview.ShapeableImageView.<init>(ShapeableImageView.java:88)
                                                                                                    	at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                                                    	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
                                                                                                    	at android.view.LayoutInflater.createView(LayoutInflater.java:743)
                                                                                                    	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:895)
                                                                                                    	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:850)
                                                                                                    	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1012)
                                                                                                    	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:973)
                                                                                                    	at android.view.LayoutInflater.inflate(LayoutInflater.java:571)
                                                                                                    	at android.view.LayoutInflater.inflate(LayoutInflater.java:462)

@Stypox
Copy link
Copy Markdown
Member

Stypox commented Nov 26, 2025

Failed to inflate ColorStateList, leaving it to the framework

This happens normally, it's an internal warning of one of the libraries, and it clutters logcat but there's no way to avoid it.

It seems to me that we are already doing that here and mapping it properly as well.

Mmmh I don't think that function gets invoked when handing tabs. I am talking about the FeedGroupTab, which stores the icon ID and saves it data as JSON in shared preferences. As you can see here when the FeedGroupTab is created its icon is initialized with entry.getIcon().getDrawableResource(). But the correct way would be to not pass an icon at all to FeedGroupTab, and instead let it obtain the icon at runtime by querying the database for feedGroupId.

Copy link
Copy Markdown
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thanks! Let's merge this in the meantime. But the migration to a proper FeedGroupTab icon handling should be done asap, before 0.28.1.

@Stypox Stypox merged commit 18f1cf2 into dev Nov 26, 2025
2 of 5 checks passed
@TobiGr TobiGr deleted the depUpdate branch November 26, 2025 17:42
@Stypox Stypox mentioned this pull request Nov 27, 2025
2 tasks
@TobiGr TobiGr linked an issue Nov 30, 2025 that may be closed by this pull request
@TobiGr TobiGr mentioned this pull request Dec 21, 2025
4 tasks
@Stypox
Copy link
Copy Markdown
Member

Stypox commented Feb 7, 2026

Now when ktlint automatically fixes some style errors, the build fails. In the past it used to fail only when there were style errors that could not be automatically fixed, which I believe was a better behavior. Could you investigate why this is happening @theimpulson?

@theimpulson
Copy link
Copy Markdown
Member Author

Now when ktlint automatically fixes some style errors, the build fails. In the past it used to fail only when there were style errors that could not be automatically fixed, which I believe was a better behavior. Could you investigate why this is happening @theimpulson?

I will take a look, thanks for noticing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Issues and PRs related to dependencies size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ktlint to 1.x

3 participants