Hi everyone!
I am working on a large C++ project and we are also building for Android. Recently our team decided to update AGP to the latest version (8.7.2). We also have a bunch of python scripts to process our native libraries after the build. These scripts expect to find the libraries in a predefined location which looks like build/intermediates/cmake/debug/...
This scheme worked fine with AGP 7.4, but it broke with the update. AGP no longer stores native build outputs in build/intermediates/cmake/debug/...
Looking for a solution I glanced over AGP source code and found some mysterious variable called NDK_SO_REPUBLISH_DIR:
The comment following the variable says:
A folder with a predictable name where final build outputs (mainly .so) are hard linked or copied after the build completes. The purpose is so scripts and other external tools have a known path, with no embedded hashcode, to locate these files.
It seems like an internal thing, but if not it is still unclear how am I supposed to use it. I have also found a commit which introduced a republishing behaviour :
https://android.googlesource.com/platform/tools/base/+/9e175de84fa6e0d706101e35632d0c031f1bc6c7
But it does not seem to work. Perhaps it should be explicitly configured. Or I misunderstand something. Anyway I was wondering if there is a way to republish native build artifacts to the old location.
Any help would be appreciated.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-ndk/de640cc2-9756-48b3-a215-47c9ff25ff00n%40googlegroups.com.
+1 to Jomo's answer.@Jomo Fisher Is the republish mechanism not working (or not working as intended)? Should we remove it?
I agree. Can/Should we delete that republishing mechanism (assuming we didn't document it officially)?