Open atsushieno opened 4 years ago
After reading https://github.com/google/prefab/issues/97 prefab does not seem to be a viable solution. What we need is some solution that makes sense:
implementation project(':androidaudioplugin')
) in androidaudioplugin-lv2. AGP should automatically add includes as well as libs.
Without such integration (like what Xamarin.Android does), it is not quite useful.
What could be workarounds until we develop some Prefab alternative?
build/intermediates/merged_native_libs/debug/out/lib/
- it is the current solution. It's just horrible.androidaudioplugin.aar
then user will have to add another reference to, say, androidaudioplugin-prefab.aar
? Needs actual experiment.Since it is not really doable to reference local aar
It does not seem to be true nowadays - https://stackoverflow.com/a/51640593/1465645
The StackOverflow solution above didn't work.
See https://github.com/alexcohn/ndk-samples/tree/prefab/unified-aar/prefab/hello-libs
This example does exactly this: an AAR that is both a Prefab and Java dependency.
Nice, thanks for the heads up. I visited the same prefab
directory in the original android-ndk tree and found that there is now a new prefab
build property (or whatever describes it) in build.gradle
, so the latest AGP seems to have the corresponding task that makes sense. https://github.com/android/ndk-samples/blob/1fa89b10613a670520f7a9dee9a6980f5d90f0f8/prefab/prefab-publishing/mylibrary/build.gradle#L46 That's a game changer.
As of filing this issue, prefab package already builds and pushed as build artifact, but it is totally untested. Since it is not really doable to reference local aar, I still haven't really added it to our androidaudioplugin-lv2
build.gradle
.