Skip to content

Configuration files

Tarek edited this page Jun 19, 2015 · 4 revisions

An inception config is a JSON file that has the following keys

Makeables

Each outermost normal key (boot, recovery, cache, update, odin) has a dedicated "maker" that generates an output out of this key's data and are called "Makeables"

Special property names

__extends__

A configuration can extend another one by setting value of "__extends__" to code name of its parent. When a config B extends config A, it inherits and extends all its properties by default. That is, a child's arrays will be merged with its parent's array, and its objects (key-val pairs) are merged with its parents:

config_a.json:

{
    "device": {
        "name": "This is config A name",
        "type": "This is config A type",
        "vals": ["config_a_val1", "config_a_val2"]
    }
}

config.b

{
    "__extends__": "config_a",
    "device": {
        "name": "This is config B name",
        "vals": ["config_b_val1", "config_b_val2"]
    }
}
> configB.get("device.vals")
["config_a_val1", "config_a_val2", "config_b_val1", "config_b_val2"]

> configB.get("device.name")
This is config B name

> configB.get("device.type")
This is config A type

__override__

  • To prevent merging of an object with its parent, set the property "override": true
  • To prevent merging of an array with its parent, add the string "override" to the array.

__make__

Boolean property can be set for each Makeable to tell inception whether it should make it or not. It can be also set for each submakeable under "update".

__depend__

  • An object can depend on existence of another property, and this other property's "__make__" value.