diff --git a/java/java.go b/java/java.go index b05d7bbd5..b0fc9db6c 100644 --- a/java/java.go +++ b/java/java.go @@ -398,6 +398,7 @@ type Dependency interface { AidlIncludeDirs() android.Paths ExportedSdkLibs() []string SrcJarArgs() ([]string, android.Paths) + BaseModuleName() string } type SdkLibraryDependency interface { diff --git a/java/robolectric.go b/java/robolectric.go index cbe3557bc..9669e1b38 100644 --- a/java/robolectric.go +++ b/java/robolectric.go @@ -105,7 +105,7 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext) r.roboSrcJar = roboSrcJar for _, dep := range ctx.GetDirectDepsWithTag(libTag) { - r.libs = append(r.libs, ctx.OtherModuleName(dep)) + r.libs = append(r.libs, dep.(Dependency).BaseModuleName()) } // TODO: this could all be removed if tradefed was used as the test runner, it will find everything @@ -233,6 +233,7 @@ func RobolectricTestFactory() android.Module { module.AddProperties( &module.Module.properties, + &module.Module.deviceProperties, &module.Module.protoProperties, &module.robolectricProperties)