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

update gradle version #42

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

SelaseKay
Copy link

Risk Level

  • No risk
  • Somewhat Risky
  • High risk

Pre-submit checklist

Comment on lines +23 to +33
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

is this needed? 🤔

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I added this snippet because the twitter_login package(i.e a dependency of the main project) uses an outdated Android Gradle Plugin (AGP version 4.1.0), which was causing compatibility issues with the main project that uses AGP 8.1.0. Specifically, the error Namespace not specified. Specify a namespace in the module's build file was occurring.

After some investigation, I found that earlier AGP versions (before 8.x.x) derived the namespace from the AndroidManifest.xml file, while AGP 8.x.x and above require the namespace to be explicitly defined in the module's build.gradle file. Since twitter_login is still on AGP 4.1.0, its namespace property in the build.gradle file was being ignored, leading to the error.

To address this, I added the quoted snippet. It ensures that for any subproject using the Android plugin (project.hasProperty('android')), the namespace is dynamically set to the project’s group property if it’s not already defined(or ignored) in the build.gradle file of the module.

Once the twitter_login package updates its AGP version to 8.x.x or later, this workaround will likely no longer be necessary. There's already an active issue requesting for AGP version upgrade: 0maru/twitter_login#140

@can-arikan
Copy link

I guess this merge request can be merged, does not it?

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.

3 participants