Merge changes I7bc54dc4,I4e9bfebd
* changes:
java_sdk_library: Correct stubs source generation classpath
Fix definition of android_stubs_current in sdk tests
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 6fa3150..9e3ad5b 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -498,17 +498,15 @@
}
}{}
- 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
diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go
index c0ad35c..788d016 100644
--- a/sdk/java_sdk_test.go
+++ b/sdk/java_sdk_test.go
@@ -46,13 +46,13 @@
java_import {
name: "core.platform.api.stubs",
}
-java_sdk_library_import {
+java_import {
name: "android_stubs_current",
}
-java_sdk_library_import {
+java_import {
name: "android_system_stubs_current",
}
-java_sdk_library_import {
+java_import {
name: "android_test_stubs_current",
}
java_import {