Call ResolveExcludes after arch-based sources computation in java.go
TEST: go test Change-Id: I93a8ae5e0842dab03f73b0edb32841755d2ea435
This commit is contained in:
@@ -755,3 +755,29 @@ func TestJavaLibraryArchVariantLibs(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestJavaLibraryArchVariantSrcsWithExcludes(t *testing.T) {
|
||||||
|
runJavaLibraryTestCase(t, Bp2buildTestCase{
|
||||||
|
Description: "java_library with arch variant libs",
|
||||||
|
Blueprint: `java_library {
|
||||||
|
name: "java-lib-1",
|
||||||
|
srcs: ["a.java", "b.java"],
|
||||||
|
target: {
|
||||||
|
android: {
|
||||||
|
exclude_srcs: ["a.java"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bazel_module: { bp2build_available: true },
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
ExpectedBazelTargets: []string{
|
||||||
|
MakeBazelTarget("java_library", "java-lib-1", AttrNameToString{
|
||||||
|
"srcs": `["b.java"] + select({
|
||||||
|
"//build/bazel/platforms/os:android": [],
|
||||||
|
"//conditions:default": ["a.java"],
|
||||||
|
})`,
|
||||||
|
}),
|
||||||
|
MakeNeverlinkDuplicateTarget("java_library", "java-lib-1"),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@@ -2660,6 +2660,7 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
srcs.ResolveExcludes()
|
||||||
|
|
||||||
javaSrcPartition := "java"
|
javaSrcPartition := "java"
|
||||||
protoSrcPartition := "proto"
|
protoSrcPartition := "proto"
|
||||||
|
Reference in New Issue
Block a user