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

Migrate to non-transitive R classes #10918

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Mar 28, 2024

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

  • Replaces Migrate to non-transitive R classes #10077.
  • Switch to non-transitive R classes, which became the default starting in Android Gradle plugin 8.0. This fixes build issues with the CI pipeline and helps speed up the build process.
  • These were the cases where R.id.* did not exist anymore and had to be replaced by the fully-qualified path.
    • R.id.content -> android.R.id.content to find the root view of an activity. I tested this manually and it works.
    • R.attr.colorSecondary -> android.R.attr.windowBackground as the bottom toolbar background color. I don't know why it was colorSecondary before, but windowBackground yields the same color as before, I tested on API 33 and API 22 on all themes. Moreover windowBackground is defined directly in styles.xml, so it should be correct.
    • R.attr.colorAccent -> android.R.attr.colorAccent as the bottom toolbar foreground color. Again, I tested on API 33 and API 22 on all themes and noticed no difference.
    • R.attr.selectableItemBackground -> android.R.attr.selectableItemBackground
    • all exoplayer string/drawable resources (which btw are all private and are not meant to be used ;-) )

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.

Due diligence

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Mar 28, 2024
@Stypox Stypox mentioned this pull request Mar 28, 2024
5 tasks
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne left a comment

Choose a reason for hiding this comment

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

Looks good to me overall, there's one small change I'd recommend making.

app/src/main/java/org/schabi/newpipe/error/ErrorUtil.kt Outdated Show resolved Hide resolved
@Stypox Stypox force-pushed the non-transitive-r branch from 430f13c to f4fb960 Compare March 28, 2024 23:17
Copy link

@Stypox
Copy link
Member Author

Stypox commented May 8, 2024

Merging, so that nightly testers can report bugs in case there is anything we missed. As explained in the PR description, I tested all changes and found no issue.

@Stypox Stypox merged commit e37336e into TeamNewPipe:dev May 8, 2024
5 of 6 checks passed
@Stypox Stypox mentioned this pull request Nov 17, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/medium PRs with less than 250 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants