What is a Project Config?
The Mason Project Configuration is a versioned manifest of the software and configurations that can be deployed to devices in a group.
Creating a Project Config
Project Configuration files are represented in the YAML file format. To create a Project Configuration YAML, open a new text file in your favorite text editor and start defining your project details.
To get a head start, copy the Example Project Configuration into
the text file and “Save As”, renaming the file extension to
.yml. From there you can customize the
configurations, app, and media enumerations however you’d like.
Notes For YAML Format
The YAML file format has a strict syntax policy that will have to be followed for the Mason Platform to accept a configuration file. For further YAML syntax information, see https://en.wikipedia.org/wiki/YAML#Syntax.
To view all available configurations, visit the Configuration Glossary.
Example Project Config
Example snippet Warehouse Distribution Configuration (see breakdown below):
os: name: warehouse-distribution version: latest configurations: mason-management: disable_keyguard: true disable_status_bar: false mason-fota: config_allow_download_over_metered: false config_update_check_frequency: 6 config_update_install_time: 12:30 config_update_install_battery_threshold: 20 config_update_prompt_prior_to_install: true mason-app-updater: config_allow_download_over_metered: true config_update_check_frequency: 12 config_update_install_time: 01:00 config_update_install_battery_threshold: 20 apps: - name: Test App package_name: com.warehouses.distribution version_code: 12 media: bootanimation: name: warehouse-distro-boot version: latest
Breakdown of the project config
os: (see definition)
name: warehouse-distribution: The project identifier that is known in the Mason Platform Project Dashboard. In this case, the project ID is
version: latest: The version of this project config. In this case, the version is a special value called
latestwhich will automatically be populated with a number like
configurations: An enumeration of all the different software configurations for this project config (see definition).
apps: (see definition)
name: Test App: An arbitrary name for your use only.
package_name: com.warehouses.distribution: The package name of the APK.
com.warehouses.distributionin this case.
version_code: 12: The version code of the APK, as it is packaged in the APK. In this case, the version is hardcoded to
12, but the special value
latestmay also be used to pick the most recently registered APK.
media: (see definition)
name: warehouse-distro-boot: The name of the boot animation as it has been registered in the Mason Platform. In this case, the boot animation ID is
version: latest: The version code of the boot animation as it has been registered to the Mason Platform. In this case, the version uses the special
latestvalue to automatically pick the most recently register boot animation, but a hardcoded number may also be used.
os tag is the metadata declaration of the project config. In its most basic form, only two
fields are required:
os: name: awesome-project
os version is a numeric, monotonically incremented, revision representation of the project
config. However, in all places where you must specify a version, the
latest keyword can be used
instead for a more hands-off approach to versioning.
os: name: awesome-project version: 1
os configurations object is an enumeration of all the different software configurations for
this project config (see definition).
configurations: example-object: example_settings: false
configurations are the software configurations that dictate everything from update policy, UI
behavior, and even hardware behavior for a specific mason build.
configuration is described by a configuration type and a key value pair that dictates the
configurations: mason-management: disable_keyguard: true disable_status_bar: false
The configuration definition above dictates that the keyguard (lockscreen) should be disabled on this software distribution, while the status bar should not be. To view all available configurations, visit the Configuration Glossary.
apps object enumerates all the registered Android applications that are to be included into
the software build. Only the
version_code properties are required.
nameattribute defines an arbitrary name (for your own record keeping)
package_nameattribute comes from the package name in your APK’s
version_codeattribute comes from the version code in your APK’s
- For more details on registering an Android application, see Registering APK Artifacts
Single app example
apps: - name: Test App package_name: com.test.app version_code: 1
Multi app example
apps: - name: Test App 1 package_name: com.test.app version_code: 1 - name: Test App 2 package_name: com.test.app2 version_code: 1
media object enumerates all the media configurations for the software distribution.
bootanimation is supported.
media: bootanimation: name: test-boot version: 1