PLS Android Integration - Supports PLS & Skia renderer via a Kotlin flag! - Adds PLS in the build flow - Fix `premake` for Android adding in the architecture parameter to output the correct version - In `rive-android` the PLS repo name is stored in a secret variable but is effectively pointing to https://github.com/rive-app/rive-pls - Fixes a missing flag for logging in debug builds - Adds a new workflow for `rive-android` to build the AAR on push so we can easily test whether the build succeeds or fails before releasing - Some refactoring to rename some classes, methods, et al. - Some tests (definitely not enough of 'em here!) in Kotlin - Adds a custom runner to make sure we're running on a devices as PLS does not support emulators. Unfortunately, this means we can't run PLS View tests on the Emulator, which is a bit disappointing, but maybe we can figure that out at some point? Or stub it out if/when we *really* need it. - Other miscellaneous fixes Diffs= 9b75cdb96 Rive Renderer Android Integration (#5539) Co-authored-by: Umberto Sonnino <umberto@rive.app>
diff --git a/.rive_head b/.rive_head index 344c9b1..c23dda5 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -f6d19cc2449cb487ff0bb007817d5e77fe117380 +9b75cdb96c2e7dc1f15551cbbf3e0f320759c078
diff --git a/out/premake5_pls_renderer.lua b/out/premake5_pls_renderer.lua index abb78aa..dd3e22b 100644 --- a/out/premake5_pls_renderer.lua +++ b/out/premake5_pls_renderer.lua
@@ -135,11 +135,34 @@ filter "system:android" do - targetdir "android_%{cfg.buildcfg}" - objdir "obj/android_%{cfg.buildcfg}" + files {"../renderer/gl/load_gles_extensions.cpp", "../renderer/gl/pls_impl_ext_native.cpp", "../renderer/gl/pls_impl_framebuffer_fetch.cpp"} + + filter {'system:android', 'options:arch=x86'} + do + targetdir '%{cfg.system}/x86/%{cfg.buildcfg}/lib' + objdir '%{cfg.system}/x86/%{cfg.buildcfg}/obj' + end + + filter {'system:android', 'options:arch=x64'} + do + targetdir '%{cfg.system}/x64/%{cfg.buildcfg}/lib' + objdir '%{cfg.system}/x64/%{cfg.buildcfg}/obj' + end + + filter {'system:android', 'options:arch=arm'} + do + targetdir '%{cfg.system}/arm/%{cfg.buildcfg}/lib' + objdir '%{cfg.system}/arm/%{cfg.buildcfg}/obj' + end + + filter {'system:android', 'options:arch=arm64'} + do + targetdir '%{cfg.system}/arm64/%{cfg.buildcfg}/lib' + objdir '%{cfg.system}/arm64/%{cfg.buildcfg}/obj' + end end filter {"system:macosx or ios", "options:not nop-obj-c"} @@ -224,3 +247,15 @@ }, default = 'system' } + +newoption { + trigger = 'arch', + value = 'ABI', + description = 'The ABI with the right toolchain for this build, generally with Android', + allowed = { + {'x86'}, + {'x64'}, + {'arm'}, + {'arm64'} + } +}