-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Android Support: Exporting to Android Archive (AAR) #10271
Android Support: Exporting to Android Archive (AAR) #10271
Conversation
Requires JAVA and Gradle ? |
Gradle is required on the consumption end of this, but not on the production end. The Java requirement comes from maven, which could be avoided if needed (it could also potentially be made an optional requirement). |
@DanAlbert
|
@atkawa7 @DanAlbert android/ndk#916 (comment) Or maybe also integrated into AS UI (SDK Manager) to search, get/build and include packages manually/automatically with as little dependencies as possible and use what's available in the AS installation.
|
@atkawa7 If at some point prefabs support: google/prefab#65 (comment) Can this feature be extended to produce debuggable prefabs? Or does this feature already do that? |
@Zingam that is doable. VCPKG supports debug libs but I didn't include them since prefabs doesn't support them yet. Once i google/prefab#65 is supported I am sure we can add the debugs. |
Thanx! I just wonder how all this stuff would fit into my current build system as I have custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with vcpkg, so please forgive any obviously incorrect review comments :)
Not sure what the benefit would be. Getting this merged here makes it available to users. Us using it wouldn't make a difference.
I don't think that's the right approach. Users should be fetching prebuilts, not building the libraries themselves. This patch makes it easy for someone to build the vcpkg corpus for Android and push them to maven as AARs. The better solution would be for someone to do that instead. |
/azp run |
It looks like we cannot use these changes to build vcpkg in Windows anymore. |
@DanAlbert Thank you for your good reviews. @JackBoosY @ras0219-msft See the news changes. Now its buildable on Visual Studio |
@JackBoosY @strega-nil @ras0219-msft Checkout the new changes |
CI test success. |
Passing CI now, and it looks like all review comments are fixed. Thanks @atkawa7 and everyone for the PR and reviews! |
Should add the new files |
I hope the vcpkg doc will be updated soon in order to reflect this, since for the moment this feature is mostly hidden for users : the official doc about triplets only mentions info about outdated android standalone toolchains. |
@pthom @strega-nil there is currently documentation on how to integrate android archives See #11052 for configuration issues that might pop up. You need to create the four android triplets yourself. Initially I had added triplets but then removed them since android users need custom triplets. |
I am not a native English speaker but I think that there are some grammatical errors in the document. Also |
@Zingam I think just android is even better |
* added android triplets * added android support to vcpkg * added export directories to git ignore * fix libraries naming * added vckpg sources to visual studio project files * rename file location * issue with std::string fs:path copy initialization * format path on VStudio * fix checks format cannot work on fs::path * support header only libraries * support using architecture instead of triplets * added prefab support * added debug logs and prefab debug flag * added support for empty packages i.e openssl
This pr add functionality to support android archives in vcpkg through exporting libs and includes to aar archives. This works similar to ndkports currently in the works by @DanAlbert . Once the archive is created then it can imported in the android as a native dependent.
Checkout the article "Native Dependencies in Android Studio 4.0" about prefab and native dependencies on https://android-developers.googleblog.com/2020/02/native-dependencies-in-android-studio-40.html
Checkout the prefab project on https://github.com/google/prefab
See NDK ports for more https://android.googlesource.com/platform/tools/ndkports
Todos
arm64-v8a
,armeabi-v7a
,x86_64
,x86
Example exporting [jsoncpp]
Requires
maven
ndk
7zip
orzip
Export