atsushieno / android-native-audio-builders

Android native library builder script
2 stars 0 forks source link

experiment and document how-to on prefab package #2

Open atsushieno opened 4 years ago

atsushieno commented 4 years ago

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.

atsushieno commented 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:

Without such integration (like what Xamarin.Android does), it is not quite useful.

What could be workarounds until we develop some Prefab alternative?

atsushieno commented 4 years ago

Since it is not really doable to reference local aar

It does not seem to be true nowadays - https://stackoverflow.com/a/51640593/1465645

atsushieno commented 4 years ago

The StackOverflow solution above didn't work.

alexcohn commented 4 years ago

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.

atsushieno commented 4 years ago

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.