Change deptag for sdk deps to help distinguish
Test: m nothing before and after and diff build.ninja files
Change-Id: Idc4c7f86d3e626bd1ee2f90ae3c6fb755644a605
diff --git a/java/robolectric.go b/java/robolectric.go
index 71ffdb1..7f2981f 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -23,6 +23,7 @@
"android/soong/android"
"android/soong/java/config"
"android/soong/tradefed"
+
"github.com/google/blueprint/proptools"
)
@@ -166,7 +167,7 @@
instrumentedApp.implementationAndResourcesJar,
}
- for _, dep := range ctx.GetDirectDepsWithTag(libTag) {
+ handleLibDeps := func(dep android.Module) {
m := ctx.OtherModuleProvider(dep, JavaInfoProvider).(JavaInfo)
r.libs = append(r.libs, ctx.OtherModuleName(dep))
if !android.InList(ctx.OtherModuleName(dep), config.FrameworkLibraries) {
@@ -174,6 +175,13 @@
}
}
+ for _, dep := range ctx.GetDirectDepsWithTag(libTag) {
+ handleLibDeps(dep)
+ }
+ for _, dep := range ctx.GetDirectDepsWithTag(sdkLibTag) {
+ handleLibDeps(dep)
+ }
+
r.combinedJar = android.PathForModuleOut(ctx, "robolectric_combined", r.outputFile.Base())
TransformJarsToJar(ctx, r.combinedJar, "combine jars", combinedJarJars, android.OptionalPath{},
false, nil, nil)