631647f4a7
The maintainers of the flutter-gallery package archived the project as of February 16, 2024, necessitating a new reference package for users to port their Flutter applications to Buildroot. The flutter-packages repository is the perfect candidate for a reference package for several reasons: - It contains the source code for Flutter's first-party packages. - Many of the packages contain examples. - Many of the examples include Linux-specific examples. - The repository is updated regularly and often automatically, ensuring compatibility with the latest versions of Flutter. However, the layout of the flutter-packages repository stores all of the examples in sub-directories, which creates an organizational problem; either every example application is stored in packages/flutter-example-${name}, with the version, site, site_method, license, license_files, and dependencies of each package independent from each other, or, each example application is in a sub-directory of the flutter-packages directory, and flutter-packages acts as the primary source of the above variables. As option one is a nightmare to maintain, this patch provides option two, which only necessitates the use of two features rarely used together in Buildroot: $(PKG_NAME)_DL_SUBDIR and $(PKG_NAME)_SOURCE. With these two options appropriately set, each sub-package uses the flutter-packages source tarball, which downloads once, saving time, disk space, bandwidth, and future maintenance headaches. Three variables in the .mk file help with subsequent patches that add more example applications: - FLUTTER_MARKDOWN_EXAMPLE_PKG_NAME: - Set to the name of the application. - FLUTTER_MARKDOWN_EXAMPLE_INSTALL_DIR: - It uses the PKG_NAME variable to set the installation directory. - FLUTTER_MARKDOWN_EXAMPLE_SUBDIR: - Provides the directory in which to build the package. With the above variables, adding subsequent packages involves minimal effort: - Copy, paste, and rename a sub-directory to a new package name. - Set the above variables to new names and directories. - Check to see if there are any new build commands, such as specifying a dart_plugin_registrant.dart file. Another option that seems appealing is to have a single package, with the Config.in options to select which example(s) to build. However, this option does not work well for two reasons: - The logic between this package and the flutter-gallery package it replaces would be very different. As the flutter-gallery package acts as a reference package for other users, changing the logic would make the package difficult to parse and possibly useless for other users to use as a reference when porting their Flutter-based applications to Buildroot. - Not all packages in the flutter-package repository use the same directory structure. Take, for example, the flutter-rfw-local-example. The build directory is located at rfw/example/local, whereas most other packages are at ${pkg_name}/example, which makes a pure-foreach loop impossible. These packages are intended for reference, and changing the logic instead of using the same would hinder users from attempting to port their Flutter applications to Buildroot. As such, this option is ruled out for the above reasons. The first package in this series is a Markdown example application that displays several Markdown formatting demos. However, it does not support inline HTML. This package also lacks a dart_plugin_registrant file, and unlike the flutter-gallery package, the lines referencing such a file are not included in the build commands. This is not a problem, but is something to note. Also, the `FLUTTER_RUNTIME_MODES=$(FLUTTER_ENGINE_RUNTIME_MODE)` line from the configure commands is not copied from the flutter-gallery package, as it was included by mistake and did not have any effecton the clean command. Note: The version of the flutter-packages git hash is set to 947e34ce9fedcdd6750b54eb1cc74b854b49ab48, the last commit that supported Flutter 3.16.x. Newer versions require Flutter 3.19.x Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
4 lines
246 B
Plaintext
4 lines
246 B
Plaintext
# Locally calculated
|
|
sha256 8276276e050c1ea45787f74b0f8c915b8cf2162b6af8537ffa9886bd423f2828 flutter-packages-947e34ce9fedcdd6750b54eb1cc74b854b49ab48-br1.tar.gz
|
|
sha256 89519eca6f7b9529b35bdddd623a58c3af06a88c458dbd6531ddb4675acf75a9 LICENSE
|