Control mutator order
Register mutators inside lambdas that are called in a defined order to correctly order mutators before and after the arch and deps mutators. Test: build.ninja identical Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
This commit is contained in:
@@ -190,7 +190,7 @@ func (j *javaBase) BootClasspath(ctx android.BaseContext) string {
|
||||
|
||||
var defaultJavaLibraries = []string{"core-libart", "core-junit", "ext", "framework"}
|
||||
|
||||
func javaDepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
func (j *javaBase) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
if j, ok := ctx.Module().(JavaModuleType); ok {
|
||||
ctx.AddDependency(ctx.Module(), nil, j.JavaDependencies(ctx)...)
|
||||
}
|
||||
@@ -513,6 +513,9 @@ type JavaPrebuilt struct {
|
||||
classJarSpecs, resourceJarSpecs []jarSpec
|
||||
}
|
||||
|
||||
func (j *JavaPrebuilt) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
}
|
||||
|
||||
func (j *JavaPrebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
if len(j.properties.Srcs) != 1 {
|
||||
ctx.ModuleErrorf("expected exactly one jar in srcs")
|
||||
|
Reference in New Issue
Block a user