diff options
author | 2024-02-29 23:09:10 +0000 | |
---|---|---|
committer | 2024-08-02 22:00:43 +0000 | |
commit | d6e978e2978b63e4d3b3cb03aef76fbe322000ba (patch) | |
tree | 9db96f693c47c28f388690f1d4bc4acf2650ce0e /api/api_test.go | |
parent | fcc577c0276ce5bff768c7a7b57960aef43d378a (diff) |
Remove full api surface from-text stubs java_api_library modules
The toggle between from-text and from-source stubs are made within
java_sdk_library level stubs, and they no longer depend on the full api
surface java_api_library modules. Therefore, these can be safely
removed.
This change also rename android_*_stubs_current.from-source to
android_*_stubs_current, and remove the full api surface modules that
are currently generated from api.go.
Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 327507877
Change-Id: If1f081693c7380e2ed5b5d4a1a7f7365ef1770ca
Diffstat (limited to 'api/api_test.go')
-rw-r--r-- | api/api_test.go | 111 |
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, |