diff options
| author | 2023-07-21 20:48:13 +0000 | |
|---|---|---|
| committer | 2023-07-21 20:48:13 +0000 | |
| commit | 8348ce92f5754c9e9df4c23347170162b03ff14c (patch) | |
| tree | d43f6f1f174bff8ca7565378a8ff29e3bbb3f338 /java/java.go | |
| parent | 8b8846ae1c47e34d69bc834beecadb056ef832d2 (diff) | |
| parent | 7873f613c4fd1c33a205e3fcbe7bac5ca40cee11 (diff) | |
Merge "java_test macro needs srcs and deps to create .jar for tradefed_test_suite" into main
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go index ee2069886..20d9afc69 100644 --- a/java/java.go +++ b/java/java.go @@ -3165,6 +3165,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { type javaTestHostAttributes struct { *javaCommonAttributes + Srcs bazel.LabelListAttribute Deps bazel.LabelListAttribute Runtime_deps bazel.LabelListAttribute } @@ -3201,8 +3202,10 @@ func javaTestHostBp2Build(ctx android.TopDownMutatorContext, m *TestHost) { hasKotlin: bp2BuildInfo.hasKotlin, } libName := createLibraryTarget(ctx, libInfo) - attrs.Runtime_deps.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + libName}}) + attrs.Srcs = commonAttrs.Srcs + attrs.Deps = deps + attrs.Runtime_deps.Add(&bazel.LabelAttribute{Value: &bazel.Label{Label: ":" + libName}}) // Create the BazelTargetModule. ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs) } |