Skip to content

Conversation

Isira-Seneviratne
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne commented May 7, 2023

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

  • 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.

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

@Isira-Seneviratne Isira-Seneviratne force-pushed the Non_transitive_R branch 2 times, most recently from 8f91e86 to ddc6634 Compare May 7, 2023 05:45
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 41 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Isira-Seneviratne Isira-Seneviratne changed the title Migrate to non-transitive R classes. Migrate to non-transitive R classes May 7, 2023
@Isira-Seneviratne
Copy link
Member Author

The SonarCloud warnings are due to the app using private ExoPlayer strings.

@SameenAhnaf SameenAhnaf added the codequality Improvements to the codebase to improve the code quality label May 12, 2023
@Profpatsch
Copy link
Contributor

Thank you, I rebased the change onto current dev.

Copy link

@Stypox
Copy link
Member

Stypox commented Mar 28, 2024

How did you choose the replacements? To me they all seem random. For example, why com.google.android.material.R.attr.colorSecondary, but instead androidx.appcompat.R.attr.colorAccent?

fun showSnackbar(context: Context, errorInfo: ErrorInfo) {
val rootView = if (context is Activity) context.findViewById<View>(R.id.content) else null
val rootView = if (context is Activity) {
context.findViewById<View>(androidx.constraintlayout.widget.R.id.content)
Copy link
Member

Choose a reason for hiding this comment

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

For example, this is wrong, and should instead be android.R.id.content.

@Stypox Stypox mentioned this pull request Mar 28, 2024
5 tasks
@Stypox
Copy link
Member

Stypox commented Mar 28, 2024

Replaced by #10918 for the reasons stated above. @Isira-Seneviratne please review/approve #10918, thanks :-).

@Stypox Stypox closed this Mar 28, 2024
@Isira-Seneviratne Isira-Seneviratne deleted the Non_transitive_R branch July 3, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codequality Improvements to the codebase to improve the code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants