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

[Draft] Bump to AGP 8.2.2 #35

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Draft

[Draft] Bump to AGP 8.2.2 #35

wants to merge 3 commits into from

Conversation

wzieba
Copy link
Contributor

@wzieba wzieba commented Feb 2, 2024

Description

This PR shows the challenge with updating to AGP 8.2.2. When running any task, we'll recive following error:

* What went wrong:
A problem occurred configuring project ':react-native-clipboard'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

react-native-clipboard (and probably other libraries) are at AGP 3.2.1 which makes bump to AGP 8.2.2 of this tool challenging.

We could likely alter the build.gradle.kts of the libraries statically, but I'm not sure if it's worth the hustle and it sounds flaky. Or maybe I'm missing some other solution.

Comment on lines +20 to +27
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.json:json:20180813")
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AGP in version 7.x provided org.json dependency (transitively):
Screenshot 2024-02-02 at 12 05 31

With AGP 8.2.2, org.json is no longer available. I've added this dependency in the same version for now, but probably a better solution would be to use built-in JSON parser: groovy.json.

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.

None yet

1 participant