diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-07-01 17:51:31 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-01 17:51:31 +0000 |
commit | 12d1bde69865c250f0995905c0726ccdbd390db6 (patch) | |
tree | 1ca6c57a33e953173fb480d2370ea9d4afde14e3 /java/java.go | |
parent | d756fc76d11c43ce1c6b9d2f00f23728574bccf8 (diff) | |
parent | 5befecfe64d0381adce24d361c33fc00349dd736 (diff) |
Merge changes Ib7ad715d,I3a83b5ed am: 7d9deed9fd am: 5befecfe64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353932
Change-Id: Ic5de5a55a939f2a1ae8ce922c31e52b6f7c443e3
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/java/java.go b/java/java.go index d8cbc1f7d..99a226b16 100644 --- a/java/java.go +++ b/java/java.go @@ -601,7 +601,7 @@ func IsStaticLibDepTag(depTag blueprint.DependencyTag) bool { } type sdkDep struct { - useModule, useFiles, useDefaultLibs, invalidVersion bool + useModule, useFiles, invalidVersion bool // The modules that will be added to the bootclasspath when targeting 1.8 or lower bootclasspath []string @@ -610,7 +610,11 @@ type sdkDep struct { // modules are to be used. systemModules string + // The modules that will be added to the classpath regardless of the Java language level targeted + classpath []string + // The modules that will be added ot the classpath when targeting 1.9 or higher + // (normally these will be on the bootclasspath when targeting 1.8 or lower) java9Classpath []string frameworkResModule string @@ -704,17 +708,14 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { j.linter.deps(ctx) sdkDep := decodeSdkDep(ctx, sdkContext(j)) - if sdkDep.useDefaultLibs { - ctx.AddVariationDependencies(nil, bootClasspathTag, config.LegacyCorePlatformBootclasspathLibraries...) - ctx.AddVariationDependencies(nil, systemModulesTag, config.LegacyCorePlatformSystemModules) - if sdkDep.hasFrameworkLibs() { - ctx.AddVariationDependencies(nil, libTag, config.FrameworkLibraries...) - } - } else if sdkDep.useModule { + if sdkDep.useModule { ctx.AddVariationDependencies(nil, bootClasspathTag, sdkDep.bootclasspath...) ctx.AddVariationDependencies(nil, java9LibTag, sdkDep.java9Classpath...) + ctx.AddVariationDependencies(nil, libTag, sdkDep.classpath...) if j.deviceProperties.EffectiveOptimizeEnabled() && sdkDep.hasStandardLibs() { ctx.AddVariationDependencies(nil, proguardRaiseTag, config.LegacyCorePlatformBootclasspathLibraries...) + } + if j.deviceProperties.EffectiveOptimizeEnabled() && sdkDep.hasFrameworkLibs() { ctx.AddVariationDependencies(nil, proguardRaiseTag, config.FrameworkLibraries...) } } |