diff options
| author | 2022-02-02 17:43:57 +0000 | |
|---|---|---|
| committer | 2022-02-02 17:43:57 +0000 | |
| commit | d519b331f24c8967841db7fa1d46e1bc5956fd10 (patch) | |
| tree | 919f2320ad1f7d0092f852a69065f3fac97d71ee /sdk/java_sdk_test.go | |
| parent | 8af15e02974d356c07722e6dec724e480739a6c7 (diff) | |
| parent | a54016c3ba5db8efd69d098e0bb4cb8b318d2efa (diff) | |
Merge changes Ie5939628,Id103f70f
* changes:
Only output annotations properties in snapshots for T+
Allow pruning of unsupported fields in structs in maps
Diffstat (limited to 'sdk/java_sdk_test.go')
| -rw-r--r-- | sdk/java_sdk_test.go | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go index 0d9b4a063..f0d3b35d7 100644 --- a/sdk/java_sdk_test.go +++ b/sdk/java_sdk_test.go @@ -1319,6 +1319,58 @@ java_sdk_library_import { ) } +func TestSnapshotWithJavaSdkLibrary_AnnotationsZip_PreT(t *testing.T) { + result := android.GroupFixturePreparers( + prepareForSdkTestWithJavaSdkLibrary, + android.FixtureMergeEnv(map[string]string{ + "SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE": "S", + }), + ).RunTestWithBp(t, ` + sdk { + name: "mysdk", + java_sdk_libs: ["myjavalib"], + } + + java_sdk_library { + name: "myjavalib", + srcs: ["Test.java"], + sdk_version: "current", + shared_library: false, + annotations_enabled: true, + public: { + enabled: true, + }, + } + `) + + CheckSnapshot(t, result, "mysdk", "", + checkUnversionedAndroidBpContents(` +// This is auto-generated. DO NOT EDIT. + +java_sdk_library_import { + name: "myjavalib", + prefer: false, + visibility: ["//visibility:public"], + apex_available: ["//apex_available:platform"], + shared_library: false, + public: { + jars: ["sdk_library/public/myjavalib-stubs.jar"], + stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], + current_api: "sdk_library/public/myjavalib.txt", + removed_api: "sdk_library/public/myjavalib-removed.txt", + sdk_version: "current", + }, +} + `), + checkAllCopyRules(` +.intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar +.intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt +.intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt + `), + checkMergeZips(".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip"), + ) +} + func TestSnapshotWithJavaSdkLibrary_CompileDex(t *testing.T) { result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` sdk { |