Improve how Beagle Flutter loads yoga in Android
Closed this issue · 1 comments
matheusribeirozup commented
Use case
yoga_engine
is a plugin with support for Android and iOS. In Flutter, plugins are Dart packages with specific configurations for each platform. For iOS, yoga_engine
accesses the native Yoga codes through the podspec
configured by Flutter. On Android, .so
files are available for each available architecture.
The problem with this approach taken on Android is to update the yoga_engine
code as Yoga is updated, in addition to the increase the plugin size, as it no longer has only the native code in C++
and has the same artifact compiled for many architectures.
Proposal
There are 3 approaches that could be applied as a solution to this problem:
- Use the
ExternalProject_Add
function with theCMakeLists.txt
to download the Yoga code straight from the Facebook's forked repository. - Move the
yoga_engine
code from the Facebook's forked repository to a separate repository and use the Yoga code as a git submodule so be able to access it locally. - Create a function in gradle that downloads and compiles native code from the Facebook's forked repository at application build time.
hernandazevedozup commented
👍