-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: main
Are you sure you want to change the base?
Conversation
subprojects { | ||
afterEvaluate { project -> | ||
if (project.hasProperty('android')) { | ||
project.android { | ||
if (namespace == null) { | ||
namespace project.group | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed? 🤔
There was a problem hiding this comment.
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
I guess this merge request can be merged, does not it? |
Risk Level
Pre-submit checklist