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 AGP to version 8.7.3 #6476

Closed
wants to merge 1 commit into from

Conversation

rvandermeulen
Copy link
Contributor

No description provided.

@bendk
Copy link
Contributor

bendk commented Nov 15, 2024

/taskcluster ci full

@rvandermeulen
Copy link
Contributor Author

mozilla/glean#2680 has some prior discussion around this bustage

@rvandermeulen rvandermeulen mentioned this pull request Dec 2, 2024
5 tasks
@rvandermeulen rvandermeulen changed the title Update AGP to version 8.7.2 Update AGP to version 8.7.3 Dec 4, 2024
@bendk
Copy link
Contributor

bendk commented Dec 4, 2024

I think I know what's happening, but I need some gradle help to figure out a solution.

Before the AGP upgrade, I see gradle copying libmegazord.so to components/crashtest/android/build/intermediates/java_res/debugUnitTest/out/linux-x86-64/libmegazord.so. After the upgrade I don't see that file there anymore. That means when the app-services code tries to load the megazord library, it results in an UnsatisfiedLinkError.

I think the issue is with this line. This line was working for AGP 8.0, but stops working after 8.1.

That code seems pretty hacky/brittle to me and I think there are better ways to do this. Maybe something to do with a configuration or artifact? However, this is where my gradle knowledge ends. Can someone point me in the right direction?

@bendk
Copy link
Contributor

bendk commented Dec 11, 2024

After more investigation I think the issue is simply that AGP is excluding the .so file when it copies it.

I changed that line to point to an absolute/static directory on my machine and copied the expected contents there -- still no libmegazord.so. Then I tried adding foo.txt file in the directory and found that gradle did copy it over. Interestingly, libmegazord.dylib also worked, maybe that's why this is working on macs?

One guess I had was that the abiFilters property which was causing gradle to skip the library, but it doesn't seem so. I tried adjusting that property and also changing the subdirectory name to x86_64 which I don't think should be filtered by default, but still no success.
Any ideas on what I can try next? It's really feeling like I'm fighting against gradle here.

After I did this, I noticed that @badboy reported almost exactly the same issue when trying to upgrade Glean: mozilla/glean#2680 (comment)

@rvandermeulen
Copy link
Contributor Author

Closing in favor of #6524 🎉

@rvandermeulen rvandermeulen deleted the rvm/agp_update branch December 12, 2024 13:56
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.

2 participants