Improve RuleBuilder documentation and methods

Add a few convenience methods, document all the methods and add
examples that would show up in the godoc if we were to actually
generate it.

Test: rule_builder_test.go
Change-Id: I270fed605ffec34e6f5b36fde0dc9ca52694b741
This commit is contained in:
Colin Cross
2019-02-01 16:42:32 -08:00
parent 786cd6dc13
commit 758290d7ff
3 changed files with 199 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ func GenerateStripRule(global GlobalConfig, module ModuleConfig) (rule *android.
tools := global.Tools
rule = &android.RuleBuilder{}
rule = android.NewRuleBuilder()
strip := shouldStripDex(module, global)
@@ -95,7 +95,7 @@ func GenerateDexpreoptRule(global GlobalConfig, module ModuleConfig) (rule *andr
}
}()
rule = &android.RuleBuilder{}
rule = android.NewRuleBuilder()
generateProfile := module.ProfileClassListing != "" && !global.DisableGenerateProfile