summaryrefslogtreecommitdiff
path: root/api/api_test.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-08-06 00:15:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-08-06 00:15:30 +0000
commitdc16c2242203783de758727d8aa306de19ab07f9 (patch)
tree9db96f693c47c28f388690f1d4bc4acf2650ce0e /api/api_test.go
parent1ae36c84c23022df5541ca1f0f60ef7fe6aef9d5 (diff)
Revert "Revert "Remove full api surface from-text stubs java_api..."
Revert submission 3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI Reason for revert: Post submit build breakage culprit fixed Reverted changes: /q/submissionid:3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI Change-Id: Ie4741daf508c7cc9c6688091d44658bfb76df6b1
Diffstat (limited to 'api/api_test.go')
-rw-r--r--api/api_test.go111
1 files changed, 58 insertions, 53 deletions
diff --git a/api/api_test.go b/api/api_test.go
index 47d167093b39..fb26f821eec1 100644
--- a/api/api_test.go
+++ b/api/api_test.go
@@ -52,6 +52,12 @@ func gatherRequiredDepsForTest() string {
"core.current.stubs",
"ext",
"framework",
+ "android_stubs_current",
+ "android_system_stubs_current",
+ "android_test_stubs_current",
+ "android_test_frameworks_core_stubs_current",
+ "android_module_lib_stubs_current",
+ "android_system_server_stubs_current",
"android_stubs_current.from-text",
"android_system_stubs_current.from-text",
"android_test_stubs_current.from-text",
@@ -190,61 +196,60 @@ func TestCombinedApisDefaults(t *testing.T) {
}
}),
).RunTestWithBp(t, `
- java_sdk_library {
- name: "framework-foo",
- srcs: ["a.java"],
- public: {
- enabled: true,
- },
- system: {
- enabled: true,
- },
- test: {
- enabled: true,
- },
- module_lib: {
- enabled: true,
- },
- api_packages: [
- "foo",
- ],
- sdk_version: "core_current",
- annotations_enabled: true,
- }
+ java_sdk_library {
+ name: "framework-foo",
+ srcs: ["a.java"],
+ public: {
+ enabled: true,
+ },
+ system: {
+ enabled: true,
+ },
+ test: {
+ enabled: true,
+ },
+ module_lib: {
+ enabled: true,
+ },
+ api_packages: [
+ "foo",
+ ],
+ sdk_version: "core_current",
+ annotations_enabled: true,
+ }
+ java_sdk_library {
+ name: "framework-bar",
+ srcs: ["a.java"],
+ public: {
+ enabled: true,
+ },
+ system: {
+ enabled: true,
+ },
+ test: {
+ enabled: true,
+ },
+ module_lib: {
+ enabled: true,
+ },
+ api_packages: [
+ "foo",
+ ],
+ sdk_version: "core_current",
+ annotations_enabled: true,
+ }
- java_sdk_library {
- name: "framework-bar",
- srcs: ["a.java"],
- public: {
- enabled: true,
- },
- system: {
- enabled: true,
- },
- test: {
- enabled: true,
- },
- module_lib: {
- enabled: true,
- },
- api_packages: [
- "foo",
+ combined_apis {
+ name: "foo",
+ bootclasspath: [
+ "framework-bar",
+ ] + select(boolean_var_for_testing(), {
+ true: [
+ "framework-foo",
],
- sdk_version: "core_current",
- annotations_enabled: true,
- }
-
- combined_apis {
- name: "foo",
- bootclasspath: [
- "framework-bar",
- ] + select(boolean_var_for_testing(), {
- true: [
- "framework-foo",
- ],
- default: [],
- }),
- }
+ default: [],
+ }),
+ }
`)
subModuleDependsOnSelectAppendedModule := java.CheckModuleHasDependency(t,