Change deptag for sdk deps to help distinguish

Test: m nothing before and after and diff build.ninja files
Change-Id: Idc4c7f86d3e626bd1ee2f90ae3c6fb755644a605
This commit is contained in:
Liz Kammer
2022-09-23 16:50:56 -04:00
parent afc97f0209
commit ef28a4c5ce
5 changed files with 22 additions and 13 deletions

View File

@@ -23,6 +23,7 @@ import (
"android/soong/android"
"android/soong/java/config"
"android/soong/tradefed"
"github.com/google/blueprint/proptools"
)
@@ -166,7 +167,7 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext)
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 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext)
}
}
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)