summaryrefslogtreecommitdiff
path: root/java/sdk_library.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-04-29 21:31:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-04-29 21:31:21 +0000
commitb407131a0ef69ebd5ec04d49d92735b1af18778f (patch)
tree3ca23736ac9d46b0ce8a606fa74b938ed33b6e4c /java/sdk_library.go
parent6e2fb5c0cd11023d009fcd6606649b75d57b714c (diff)
parent7b78b4d404328b5555ff720bb06d627e009d8db6 (diff)
Merge changes I7bc54dc4,I4e9bfebd
* changes: java_sdk_library: Correct stubs source generation classpath Fix definition of android_stubs_current in sdk tests
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r--java/sdk_library.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 6fa315082..9e3ad5bfa 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -498,17 +498,15 @@ func (module *SdkLibrary) createStubsSources(mctx android.LoadHookContext, apiSc
}
}{}
- sdkDep := decodeSdkDep(mctx, sdkContext(&module.Library))
- // Use the platform API if standard libraries were requested, otherwise use
- // no default libraries.
- sdkVersion := ""
- if !sdkDep.hasStandardLibs() {
- sdkVersion = "none"
- }
+ // The stubs source processing uses the same compile time classpath when extracting the
+ // API from the implementation library as it does when compiling it. i.e. the same
+ // * sdk version
+ // * system_modules
+ // * libs (static_libs/libs)
props.Name = proptools.StringPtr(module.docsName(apiScope))
props.Srcs = append(props.Srcs, module.Library.Module.properties.Srcs...)
- props.Sdk_version = proptools.StringPtr(sdkVersion)
+ props.Sdk_version = module.Library.Module.deviceProperties.Sdk_version
props.System_modules = module.Library.Module.deviceProperties.System_modules
props.Installable = proptools.BoolPtr(false)
// A droiddoc module has only one Libs property and doesn't distinguish between