commit | af4fd215ebbe3c3b93fccd24f82943ff8c4596ca | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Fri Jul 28 14:32:36 2017 -0700 |
committer | Colin Cross <ccross@android.com> | Tue Aug 01 15:12:12 2017 -0700 |
tree | 8e60a440f4115cb52ca2f382cb9c177de109b399 | |
parent | 05b3607c378dc6557d64ae6cecee3f7fe1b22b13 [diff] |
Add TopDownMutatorContext.CreateModule Allow a module to create other modules as if they were specified in a blueprint file. CreateModule takes the name of a module type, calls the factory function the module type, and then inserts properties into the property structs returned by the factory. Bug: 64161749 Test: TestCreateModule Change-Id: Ic1903305d6b08eae1edc7f0fb4137e85544aac0f
Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.