Remove duplication of bootclasspath in DefaultLibraries

Don't add bootclasspath libraries as classpath dependencies too.

Test: m -j checkbuild
Change-Id: Icb45e45536ce3babab73f67d281ca593edd4ab7f
This commit is contained in:
Colin Cross
2017-09-23 19:57:16 -07:00
parent 968df27a9c
commit cb2c92961c
3 changed files with 5 additions and 3 deletions

View File

@@ -26,7 +26,8 @@ import (
var ( var (
pctx = android.NewPackageContext("android/soong/java/config") pctx = android.NewPackageContext("android/soong/java/config")
DefaultLibraries = []string{"core-oj", "core-libart", "ext", "framework", "okhttp"} DefaultBootclasspathLibraries = []string{"core-oj", "core-libart"}
DefaultLibraries = []string{"ext", "framework", "okhttp"}
) )
func init() { func init() {

View File

@@ -26,6 +26,7 @@ func init() {
func makeVarsProvider(ctx android.MakeVarsContext) { func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("TARGET_DEFAULT_JAVA_LIBRARIES", strings.Join(DefaultLibraries, " ")) ctx.Strict("TARGET_DEFAULT_JAVA_LIBRARIES", strings.Join(DefaultLibraries, " "))
ctx.Strict("TARGET_DEFAULT_BOOTCLASSPATH_LIBRARIES", strings.Join(DefaultBootclasspathLibraries, " "))
ctx.Strict("DEFAULT_JAVA_LANGUAGE_VERSION", "${DefaultJavaVersion}") ctx.Strict("DEFAULT_JAVA_LANGUAGE_VERSION", "${DefaultJavaVersion}")

View File

@@ -258,7 +258,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
if ctx.Device() { if ctx.Device() {
sdkDep := decodeSdkDep(ctx, j.deviceProperties.Sdk_version) sdkDep := decodeSdkDep(ctx, j.deviceProperties.Sdk_version)
if sdkDep.useDefaultLibs { if sdkDep.useDefaultLibs {
ctx.AddDependency(ctx.Module(), bootClasspathTag, "core-oj", "core-libart") ctx.AddDependency(ctx.Module(), bootClasspathTag, config.DefaultBootclasspathLibraries...)
ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...) ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...)
} }
if sdkDep.useModule { if sdkDep.useModule {
@@ -266,7 +266,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
} }
} else { } else {
if j.deviceProperties.Dex { if j.deviceProperties.Dex {
ctx.AddDependency(ctx.Module(), bootClasspathTag, "core-oj", "core-libart") ctx.AddDependency(ctx.Module(), bootClasspathTag, config.DefaultBootclasspathLibraries...)
} }
} }
} }