NervesFlutterSupport.Downloader (nerves_flutter_support v1.3.0)

Module that contains functions to download files from the nerves_flutter_support CDN and Girhub.

Summary

Functions

Computes and returns the URL to the host utilities archive that matches this release of nerves_flutter_support.

Computes and returns the URL to the runtime artifact archive that matches this release of nerves_flutter_support.

Downloads the Flutter Linux Embedded host tools archive for this version of nerves_flutter_support.

Downloads the Flutter Linux Embedded runtime artifact archive for this version of nerves_flutter_support.

Gets the Flutter engine hash from the FLUTTER_ENGINE_HASH file.

Functions

create_host_utils_url()

@spec create_host_utils_url() :: String.t()

Computes and returns the URL to the host utilities archive that matches this release of nerves_flutter_support.

In general this is tied to the FLUTTER_ENGINE_HASH value in the package.

create_runtime_url()

@spec create_runtime_url() :: String.t()

Computes and returns the URL to the runtime artifact archive that matches this release of nerves_flutter_support.

In general this is tied to the FLUTTER_ENGINE_HASH value in the package.

download_host_tools()

@spec download_host_tools() :: {:ok, binary()} | {:error, term()}

Downloads the Flutter Linux Embedded host tools archive for this version of nerves_flutter_support.

download_runtime_artifacts()

@spec download_runtime_artifacts() :: {:ok, binary()} | {:error, term()}

Downloads the Flutter Linux Embedded runtime artifact archive for this version of nerves_flutter_support.

get_flutter_hash()

@spec get_flutter_hash() :: String.t()

Gets the Flutter engine hash from the FLUTTER_ENGINE_HASH file.

This is used to compute the URL to download pre-build artifacts.