sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Use `prefab` for publishing Android NDK native libraries

Open marandaneto opened this issue 4 years ago • 5 comments

Today, if people need to use the public API on sentry-native, they have to add a 3rd party plugin that copies the so files during build time.

https://docs.sentry.io/platforms/android/using-ndk/#allowing-the-compiler-to-link-libraries

if for some reason, people can't use this 3rd party plugin, they have to copy-paste the so files from the aar manually on every SDK update.

Google released the prefab that makes it possible on AGP 4.x but Sentry has to publish the NDK support using the correct format (prefab)

https://developer.android.com/studio/build/native-dependencies?agpversion=4.1

marandaneto avatar Apr 21 '21 07:04 marandaneto

That is gonna force people using newer versions of AGP, that could be a problem for a portion of Android users, but the majority of the problem would come from Hybrid SDKs (RN and Flutter) since they are always behind.

marandaneto avatar Jan 18 '22 16:01 marandaneto

https://developer.android.com/studio/releases/gradle-plugin#cpp-references

marandaneto avatar May 18 '22 12:05 marandaneto

That is gonna force people using newer versions of AGP, that could be a problem for a portion of Android users, but the majority of the problem would come from Hybrid SDKs (RN and Flutter) since they are always behind.

Can't we just support both (the 3rd party plugin and the official prefab method) at the same time?

SemMulder avatar Dec 13 '22 17:12 SemMulder

Be sure that using prefab doesn't require extra work on Hybrid SDKs, and if it does, loop us in.

marandaneto avatar May 22 '23 07:05 marandaneto

Let's try to do this in a backward-compatible way.

markushi avatar Aug 02 '23 14:08 markushi