summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/droidstubs.go4
-rw-r--r--java/java.go12
2 files changed, 13 insertions, 3 deletions
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 272cf1e6e..2921c3e82 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -477,7 +477,9 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
Flag("--format=v2").
FlagWithArg("--repeat-errors-max ", "10").
FlagWithArg("--hide ", "UnresolvedImport").
- FlagWithArg("--hide ", "InvalidNullability")
+ FlagWithArg("--hide ", "InvalidNullability").
+ // b/223382732
+ FlagWithArg("--hide ", "ChangedDefault")
return cmd
}
diff --git a/java/java.go b/java/java.go
index 0a35908dd..895ce7af1 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2011,8 +2011,16 @@ type javaLibraryAttributes struct {
}
func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext) *javaLibraryAttributes {
- //TODO(b/209577426): Support multiple arch variants
- srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs))
+ var srcs bazel.LabelListAttribute
+ archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{})
+ for axis, configToProps := range archVariantProps {
+ for config, _props := range configToProps {
+ if archProps, ok := _props.(*CommonProperties); ok {
+ archSrcs := android.BazelLabelForModuleSrcExcludes(ctx, archProps.Srcs, archProps.Exclude_srcs)
+ srcs.SetSelectValue(axis, config, archSrcs)
+ }
+ }
+ }
javaSrcPartition := "java"
protoSrcPartition := "proto"