java: add default libraries for device builds

Add implicit libraries core-libart, core-junit, ext, and framework
to device java builds.

Change-Id: I8b4e1e54bfd4bc89fbcd211ab8da6bbcf092c523
This commit is contained in:
Colin Cross 2015-04-16 14:08:06 -07:00
parent e7a9f3f7ed
commit efb9ebe14f

View file

@ -154,6 +154,8 @@ func (j *javaBase) BootClasspath(ctx common.AndroidBaseContext) string {
}
}
var defaultJavaLibraries = []string{"core-libart", "core-junit", "ext", "framework"}
func (j *javaBase) AndroidDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string {
var deps []string
@ -162,6 +164,9 @@ func (j *javaBase) AndroidDynamicDependencies(ctx common.AndroidDynamicDependerM
if bootClasspath != "" {
deps = append(deps, bootClasspath)
}
if ctx.Device() && j.properties.Sdk_version == "" {
deps = append(deps, defaultJavaLibraries...)
}
}
deps = append(deps, j.properties.Java_libs...)
deps = append(deps, j.properties.Java_static_libs...)