| Summary: | Allow Android Java shim to be built as an AAR | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Cole Campbell <cole.campbell> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | don't know | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
| Attachments: | Patch file which adds additional gradle project properties. | ||
Added, thanks! https://hg.libsdl.org/SDL/rev/934d77867168 |
Created attachment 3128 [details] Patch file which adds additional gradle project properties. When using SDL2 with Xamarin on Android, we need to build the project differently than we would if we were compiling native code directly into an APK. The attached patch adds two project properties to gradle.build: 1. BUILD_AS_LIBRARY which, when present, ignores the jni/src folder entirely and outputs an AAR file containing the Java shim project. The AAR is required to create a Xamarin Bindings Library, which we can use to inherit from SDLActivity within a C# project. 2. EXCLUDE_NATIVE_LIBS which prevents the shared object files from being placed into the resulting APK or AAR file. In Xamarin we include these elsewhere in the .NET project structure, so putting them in the AAR is redundant.