Move dexpreopt.Script to android.RuleBuilder
Move dexpreopt.Script to android.RuleBuilder so that the builder style can be used in more places. Also add tests for it. Test: rule_builder_test.go Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/dexpreopt"
|
||||
|
||||
"github.com/google/blueprint/pathtools"
|
||||
@@ -121,7 +122,7 @@ func writeScripts(global dexpreopt.GlobalConfig, module dexpreopt.ModuleConfig,
|
||||
panic(err)
|
||||
}
|
||||
|
||||
write := func(rule *dexpreopt.Rule, file string) {
|
||||
write := func(rule *android.RuleBuilder, file string) {
|
||||
script := &bytes.Buffer{}
|
||||
script.WriteString(scriptHeader)
|
||||
for _, c := range rule.Commands() {
|
||||
|
Reference in New Issue
Block a user