diff options
| author | 2023-07-17 16:36:19 -0700 | |
|---|---|---|
| committer | 2023-07-17 16:39:07 -0700 | |
| commit | 7873f613c4fd1c33a205e3fcbe7bac5ca40cee11 (patch) | |
| tree | 539b1402cd7d2a6f35c8f793cb1574c26e4e471d /java/java.go | |
| parent | adb892c5393a6b1a3a40984fec14e3f51b102571 (diff) | |
java_test macro needs srcs and deps to create .jar for tradefed_test_suite
Test: java_test_host_conversion_test.go and TH
Bug: 280452825
Change-Id: Ibf0c7eed415fc58a4d228f0347ab125fdc4466e4
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 011dc1c54..2ed1130ff 100644 --- a/java/java.go +++ b/java/java.go @@ -3151,6 +3151,7 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) { type javaTestHostAttributes struct { *javaCommonAttributes + Srcs bazel.LabelListAttribute Deps bazel.LabelListAttribute Runtime_deps bazel.LabelListAttribute } @@ -3187,8 +3188,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) } |