Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 1 | // Copyright (C) 2021 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package sdk |
| 16 | |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 17 | import ( |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 18 | "fmt" |
| 19 | "path/filepath" |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 20 | "testing" |
| 21 | |
| 22 | "android/soong/android" |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 23 | "android/soong/java" |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 24 | ) |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 25 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 26 | // fixtureAddPlatformBootclasspathForBootclasspathFragment adds a platform_bootclasspath module that |
| 27 | // references the bootclasspath fragment. |
| 28 | func fixtureAddPlatformBootclasspathForBootclasspathFragment(apex, fragment string) android.FixturePreparer { |
| 29 | return android.GroupFixturePreparers( |
| 30 | // Add a platform_bootclasspath module. |
| 31 | android.FixtureAddTextFile("frameworks/base/boot/Android.bp", fmt.Sprintf(` |
| 32 | platform_bootclasspath { |
| 33 | name: "platform-bootclasspath", |
| 34 | fragments: [ |
| 35 | { |
| 36 | apex: "%s", |
| 37 | module: "%s", |
| 38 | }, |
| 39 | ], |
| 40 | } |
| 41 | `, apex, fragment)), |
| 42 | android.FixtureAddFile("frameworks/base/config/boot-profile.txt", nil), |
Jiakai Zhang | 49b1eb6 | 2021-11-26 18:09:27 +0000 | [diff] [blame] | 43 | android.FixtureAddFile("frameworks/base/config/boot-image-profile.txt", nil), |
Paul Duffin | c8ead41 | 2021-06-07 19:28:15 +0100 | [diff] [blame] | 44 | android.FixtureAddFile("build/soong/scripts/check_boot_jars/package_allowed_list.txt", nil), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 45 | ) |
| 46 | } |
| 47 | |
| 48 | // fixtureAddPrebuiltApexForBootclasspathFragment adds a prebuilt_apex that exports the fragment. |
| 49 | func fixtureAddPrebuiltApexForBootclasspathFragment(apex, fragment string) android.FixturePreparer { |
| 50 | apexFile := fmt.Sprintf("%s.apex", apex) |
| 51 | dir := "prebuilts/apex" |
| 52 | return android.GroupFixturePreparers( |
| 53 | // A preparer to add a prebuilt apex to the test fixture. |
| 54 | android.FixtureAddTextFile(filepath.Join(dir, "Android.bp"), fmt.Sprintf(` |
| 55 | prebuilt_apex { |
| 56 | name: "%s", |
| 57 | src: "%s", |
| 58 | exported_bootclasspath_fragments: [ |
| 59 | "%s", |
| 60 | ], |
| 61 | } |
| 62 | `, apex, apexFile, fragment)), |
| 63 | android.FixtureAddFile(filepath.Join(dir, apexFile), nil), |
| 64 | ) |
| 65 | } |
| 66 | |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 67 | func TestSnapshotWithBootclasspathFragment_ImageName(t *testing.T) { |
| 68 | result := android.GroupFixturePreparers( |
| 69 | prepareForSdkTestWithJava, |
Paul Duffin | 023dba0 | 2021-04-22 01:45:29 +0100 | [diff] [blame] | 70 | java.PrepareForTestWithJavaDefaultModules, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 71 | prepareForSdkTestWithApex, |
| 72 | |
| 73 | // Some additional files needed for the art apex. |
| 74 | android.FixtureMergeMockFs(android.MockFS{ |
| 75 | "com.android.art.avbpubkey": nil, |
| 76 | "com.android.art.pem": nil, |
| 77 | "system/sepolicy/apex/com.android.art-file_contexts": nil, |
| 78 | }), |
Paul Duffin | 023dba0 | 2021-04-22 01:45:29 +0100 | [diff] [blame] | 79 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 80 | // Add a platform_bootclasspath that depends on the fragment. |
| 81 | fixtureAddPlatformBootclasspathForBootclasspathFragment("com.android.art", "mybootclasspathfragment"), |
Paul Duffin | 023dba0 | 2021-04-22 01:45:29 +0100 | [diff] [blame] | 82 | |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 83 | java.FixtureConfigureBootJars("com.android.art:mybootlib"), |
| 84 | android.FixtureWithRootAndroidBp(` |
| 85 | sdk { |
| 86 | name: "mysdk", |
| 87 | bootclasspath_fragments: ["mybootclasspathfragment"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | apex { |
| 91 | name: "com.android.art", |
| 92 | key: "com.android.art.key", |
| 93 | bootclasspath_fragments: [ |
| 94 | "mybootclasspathfragment", |
| 95 | ], |
| 96 | updatable: false, |
| 97 | } |
| 98 | |
| 99 | bootclasspath_fragment { |
| 100 | name: "mybootclasspathfragment", |
| 101 | image_name: "art", |
Paul Duffin | f23bc47 | 2021-04-27 12:42:20 +0100 | [diff] [blame] | 102 | contents: ["mybootlib"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 103 | apex_available: ["com.android.art"], |
| 104 | } |
| 105 | |
| 106 | apex_key { |
| 107 | name: "com.android.art.key", |
| 108 | public_key: "com.android.art.avbpubkey", |
| 109 | private_key: "com.android.art.pem", |
| 110 | } |
| 111 | |
| 112 | java_library { |
| 113 | name: "mybootlib", |
| 114 | srcs: ["Test.java"], |
| 115 | system_modules: "none", |
| 116 | sdk_version: "none", |
| 117 | compile_dex: true, |
| 118 | apex_available: ["com.android.art"], |
| 119 | } |
| 120 | `), |
| 121 | ).RunTest(t) |
| 122 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 123 | // A preparer to update the test fixture used when processing an unpackage snapshot. |
| 124 | preparerForSnapshot := fixtureAddPrebuiltApexForBootclasspathFragment("com.android.art", "mybootclasspathfragment") |
Paul Duffin | 023dba0 | 2021-04-22 01:45:29 +0100 | [diff] [blame] | 125 | |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 126 | CheckSnapshot(t, result, "mysdk", "", |
| 127 | checkUnversionedAndroidBpContents(` |
| 128 | // This is auto-generated. DO NOT EDIT. |
| 129 | |
| 130 | prebuilt_bootclasspath_fragment { |
| 131 | name: "mybootclasspathfragment", |
| 132 | prefer: false, |
| 133 | visibility: ["//visibility:public"], |
| 134 | apex_available: ["com.android.art"], |
| 135 | image_name: "art", |
Paul Duffin | 2dc665b | 2021-04-23 16:58:51 +0100 | [diff] [blame] | 136 | contents: ["mybootlib"], |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 137 | hidden_api: { |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 138 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 139 | metadata: "hiddenapi/metadata.csv", |
| 140 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 141 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 142 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 143 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 144 | }, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | java_import { |
| 148 | name: "mybootlib", |
| 149 | prefer: false, |
| 150 | visibility: ["//visibility:public"], |
| 151 | apex_available: ["com.android.art"], |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 152 | jars: ["java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 153 | } |
| 154 | `), |
| 155 | checkVersionedAndroidBpContents(` |
| 156 | // This is auto-generated. DO NOT EDIT. |
| 157 | |
| 158 | prebuilt_bootclasspath_fragment { |
| 159 | name: "mysdk_mybootclasspathfragment@current", |
| 160 | sdk_member_name: "mybootclasspathfragment", |
| 161 | visibility: ["//visibility:public"], |
| 162 | apex_available: ["com.android.art"], |
| 163 | image_name: "art", |
Paul Duffin | 2dc665b | 2021-04-23 16:58:51 +0100 | [diff] [blame] | 164 | contents: ["mysdk_mybootlib@current"], |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 165 | hidden_api: { |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 166 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 167 | metadata: "hiddenapi/metadata.csv", |
| 168 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 169 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 170 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 171 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 172 | }, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | java_import { |
| 176 | name: "mysdk_mybootlib@current", |
| 177 | sdk_member_name: "mybootlib", |
| 178 | visibility: ["//visibility:public"], |
| 179 | apex_available: ["com.android.art"], |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 180 | jars: ["java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | sdk_snapshot { |
| 184 | name: "mysdk@current", |
| 185 | visibility: ["//visibility:public"], |
| 186 | bootclasspath_fragments: ["mysdk_mybootclasspathfragment@current"], |
| 187 | java_boot_libs: ["mysdk_mybootlib@current"], |
| 188 | } |
| 189 | `), |
| 190 | checkAllCopyRules(` |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 191 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/annotation-flags.csv -> hiddenapi/annotation-flags.csv |
| 192 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/metadata.csv -> hiddenapi/metadata.csv |
| 193 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/index.csv -> hiddenapi/index.csv |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 194 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/signature-patterns.csv -> hiddenapi/signature-patterns.csv |
Paul Duffin | 280bae6 | 2021-07-20 18:03:53 +0100 | [diff] [blame] | 195 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-stub-flags.csv -> hiddenapi/filtered-stub-flags.csv |
| 196 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-flags.csv -> hiddenapi/filtered-flags.csv |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 197 | .intermediates/mysdk/common_os/empty -> java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar |
Paul Duffin | da286f4 | 2021-06-29 11:59:23 +0100 | [diff] [blame] | 198 | `), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 199 | snapshotTestPreparer(checkSnapshotWithoutSource, preparerForSnapshot), |
Paul Duffin | c8ead41 | 2021-06-07 19:28:15 +0100 | [diff] [blame] | 200 | |
| 201 | // Check the behavior of the snapshot without the source. |
| 202 | snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) { |
| 203 | // Make sure that the boot jars package check rule includes the dex jar retrieved from the prebuilt apex. |
| 204 | checkBootJarsPackageCheckRule(t, result, "out/soong/.intermediates/prebuilts/apex/com.android.art.deapexer/android_common/deapexer/javalib/mybootlib.jar") |
| 205 | }), |
| 206 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 207 | snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot), |
| 208 | snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot), |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 209 | ) |
Paul Duffin | c8ead41 | 2021-06-07 19:28:15 +0100 | [diff] [blame] | 210 | |
| 211 | // Make sure that the boot jars package check rule includes the dex jar created from the source. |
| 212 | checkBootJarsPackageCheckRule(t, result, "out/soong/.intermediates/mybootlib/android_common_apex10000/aligned/mybootlib.jar") |
| 213 | } |
| 214 | |
| 215 | // checkBootJarsPackageCheckRule checks that the supplied module is an input to the boot jars |
| 216 | // package check rule. |
| 217 | func checkBootJarsPackageCheckRule(t *testing.T, result *android.TestResult, expectedModule string) { |
| 218 | platformBcp := result.ModuleForTests("platform-bootclasspath", "android_common") |
| 219 | bootJarsCheckRule := platformBcp.Rule("boot_jars_package_check") |
| 220 | command := bootJarsCheckRule.RuleParams.Command |
| 221 | expectedCommandArgs := " out/soong/host/linux-x86/bin/dexdump build/soong/scripts/check_boot_jars/package_allowed_list.txt " + expectedModule + " &&" |
| 222 | android.AssertStringDoesContain(t, "boot jars package check", command, expectedCommandArgs) |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | func TestSnapshotWithBootClasspathFragment_Contents(t *testing.T) { |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 226 | result := android.GroupFixturePreparers( |
| 227 | prepareForSdkTestWithJava, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 228 | java.PrepareForTestWithJavaDefaultModules, |
| 229 | java.PrepareForTestWithJavaSdkLibraryFiles, |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 230 | java.FixtureWithLastReleaseApis("mysdklibrary", "myothersdklibrary", "mycoreplatform"), |
satayev | d604b21 | 2021-07-21 14:23:52 +0100 | [diff] [blame] | 231 | java.FixtureConfigureApexBootJars("myapex:mybootlib", "myapex:myothersdklibrary"), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 232 | prepareForSdkTestWithApex, |
| 233 | |
| 234 | // Add a platform_bootclasspath that depends on the fragment. |
| 235 | fixtureAddPlatformBootclasspathForBootclasspathFragment("myapex", "mybootclasspathfragment"), |
| 236 | |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 237 | android.FixtureWithRootAndroidBp(` |
| 238 | sdk { |
| 239 | name: "mysdk", |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 240 | bootclasspath_fragments: ["mybootclasspathfragment"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 241 | java_sdk_libs: [ |
| 242 | // This is not strictly needed as it should be automatically added to the sdk_snapshot as |
| 243 | // a java_sdk_libs module because it is used in the mybootclasspathfragment's |
| 244 | // api.stub_libs property. However, it is specified here to ensure that duplicates are |
| 245 | // correctly deduped. |
| 246 | "mysdklibrary", |
| 247 | ], |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 248 | } |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 249 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 250 | apex { |
| 251 | name: "myapex", |
| 252 | key: "myapex.key", |
| 253 | min_sdk_version: "2", |
| 254 | bootclasspath_fragments: ["mybootclasspathfragment"], |
| 255 | } |
| 256 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 257 | bootclasspath_fragment { |
| 258 | name: "mybootclasspathfragment", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 259 | apex_available: ["myapex"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 260 | contents: [ |
| 261 | // This should be automatically added to the sdk_snapshot as a java_boot_libs module. |
| 262 | "mybootlib", |
| 263 | // This should be automatically added to the sdk_snapshot as a java_sdk_libs module. |
| 264 | "myothersdklibrary", |
| 265 | ], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 266 | api: { |
| 267 | stub_libs: ["mysdklibrary"], |
| 268 | }, |
| 269 | core_platform_api: { |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 270 | // This should be automatically added to the sdk_snapshot as a java_sdk_libs module. |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 271 | stub_libs: ["mycoreplatform"], |
| 272 | }, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | java_library { |
| 276 | name: "mybootlib", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 277 | apex_available: ["myapex"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 278 | srcs: ["Test.java"], |
| 279 | system_modules: "none", |
| 280 | sdk_version: "none", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 281 | min_sdk_version: "2", |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 282 | compile_dex: true, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 283 | permitted_packages: ["mybootlib"], |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 284 | } |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 285 | |
| 286 | java_sdk_library { |
| 287 | name: "mysdklibrary", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 288 | apex_available: ["myapex"], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 289 | srcs: ["Test.java"], |
Paul Duffin | f4600f6 | 2021-05-13 22:34:45 +0100 | [diff] [blame] | 290 | shared_library: false, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 291 | public: {enabled: true}, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 292 | min_sdk_version: "2", |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | java_sdk_library { |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 296 | name: "myothersdklibrary", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 297 | apex_available: ["myapex"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 298 | srcs: ["Test.java"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 299 | compile_dex: true, |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 300 | public: {enabled: true}, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 301 | min_sdk_version: "2", |
| 302 | permitted_packages: ["myothersdklibrary"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 303 | } |
| 304 | |
| 305 | java_sdk_library { |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 306 | name: "mycoreplatform", |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 307 | apex_available: ["myapex"], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 308 | srcs: ["Test.java"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 309 | compile_dex: true, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 310 | public: {enabled: true}, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 311 | min_sdk_version: "2", |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 312 | } |
Paul Duffin | 4a1d451 | 2021-03-18 10:12:26 +0000 | [diff] [blame] | 313 | `), |
| 314 | ).RunTest(t) |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 315 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 316 | // A preparer to update the test fixture used when processing an unpackage snapshot. |
| 317 | preparerForSnapshot := fixtureAddPrebuiltApexForBootclasspathFragment("myapex", "mybootclasspathfragment") |
| 318 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 319 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 320 | checkUnversionedAndroidBpContents(` |
| 321 | // This is auto-generated. DO NOT EDIT. |
| 322 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 323 | prebuilt_bootclasspath_fragment { |
| 324 | name: "mybootclasspathfragment", |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 325 | prefer: false, |
| 326 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 327 | apex_available: ["myapex"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 328 | contents: [ |
| 329 | "mybootlib", |
| 330 | "myothersdklibrary", |
| 331 | ], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 332 | api: { |
| 333 | stub_libs: ["mysdklibrary"], |
| 334 | }, |
| 335 | core_platform_api: { |
| 336 | stub_libs: ["mycoreplatform"], |
| 337 | }, |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 338 | hidden_api: { |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 339 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 340 | metadata: "hiddenapi/metadata.csv", |
| 341 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 342 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 343 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 344 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 345 | }, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 346 | } |
| 347 | |
| 348 | java_import { |
| 349 | name: "mybootlib", |
| 350 | prefer: false, |
| 351 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 352 | apex_available: ["myapex"], |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 353 | jars: ["java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 354 | permitted_packages: ["mybootlib"], |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 355 | } |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 356 | |
| 357 | java_sdk_library_import { |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 358 | name: "myothersdklibrary", |
| 359 | prefer: false, |
| 360 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 361 | apex_available: ["myapex"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 362 | shared_library: true, |
| 363 | compile_dex: true, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 364 | permitted_packages: ["myothersdklibrary"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 365 | public: { |
| 366 | jars: ["sdk_library/public/myothersdklibrary-stubs.jar"], |
| 367 | stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"], |
| 368 | current_api: "sdk_library/public/myothersdklibrary.txt", |
| 369 | removed_api: "sdk_library/public/myothersdklibrary-removed.txt", |
| 370 | sdk_version: "current", |
| 371 | }, |
| 372 | } |
| 373 | |
| 374 | java_sdk_library_import { |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 375 | name: "mysdklibrary", |
| 376 | prefer: false, |
| 377 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 378 | apex_available: ["myapex"], |
Paul Duffin | f4600f6 | 2021-05-13 22:34:45 +0100 | [diff] [blame] | 379 | shared_library: false, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 380 | public: { |
| 381 | jars: ["sdk_library/public/mysdklibrary-stubs.jar"], |
| 382 | stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"], |
| 383 | current_api: "sdk_library/public/mysdklibrary.txt", |
| 384 | removed_api: "sdk_library/public/mysdklibrary-removed.txt", |
| 385 | sdk_version: "current", |
| 386 | }, |
| 387 | } |
| 388 | |
| 389 | java_sdk_library_import { |
| 390 | name: "mycoreplatform", |
| 391 | prefer: false, |
| 392 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 393 | apex_available: ["myapex"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 394 | shared_library: true, |
| 395 | compile_dex: true, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 396 | public: { |
| 397 | jars: ["sdk_library/public/mycoreplatform-stubs.jar"], |
| 398 | stub_srcs: ["sdk_library/public/mycoreplatform_stub_sources"], |
| 399 | current_api: "sdk_library/public/mycoreplatform.txt", |
| 400 | removed_api: "sdk_library/public/mycoreplatform-removed.txt", |
| 401 | sdk_version: "current", |
| 402 | }, |
| 403 | } |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 404 | `), |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 405 | checkVersionedAndroidBpContents(` |
| 406 | // This is auto-generated. DO NOT EDIT. |
| 407 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 408 | prebuilt_bootclasspath_fragment { |
| 409 | name: "mysdk_mybootclasspathfragment@current", |
| 410 | sdk_member_name: "mybootclasspathfragment", |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 411 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 412 | apex_available: ["myapex"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 413 | contents: [ |
| 414 | "mysdk_mybootlib@current", |
| 415 | "mysdk_myothersdklibrary@current", |
| 416 | ], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 417 | api: { |
| 418 | stub_libs: ["mysdk_mysdklibrary@current"], |
| 419 | }, |
| 420 | core_platform_api: { |
| 421 | stub_libs: ["mysdk_mycoreplatform@current"], |
| 422 | }, |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 423 | hidden_api: { |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 424 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 425 | metadata: "hiddenapi/metadata.csv", |
| 426 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 427 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 428 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 429 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 430 | }, |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | java_import { |
| 434 | name: "mysdk_mybootlib@current", |
| 435 | sdk_member_name: "mybootlib", |
| 436 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 437 | apex_available: ["myapex"], |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 438 | jars: ["java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 439 | permitted_packages: ["mybootlib"], |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 440 | } |
| 441 | |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 442 | java_sdk_library_import { |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 443 | name: "mysdk_myothersdklibrary@current", |
| 444 | sdk_member_name: "myothersdklibrary", |
| 445 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 446 | apex_available: ["myapex"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 447 | shared_library: true, |
| 448 | compile_dex: true, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 449 | permitted_packages: ["myothersdklibrary"], |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 450 | public: { |
| 451 | jars: ["sdk_library/public/myothersdklibrary-stubs.jar"], |
| 452 | stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"], |
| 453 | current_api: "sdk_library/public/myothersdklibrary.txt", |
| 454 | removed_api: "sdk_library/public/myothersdklibrary-removed.txt", |
| 455 | sdk_version: "current", |
| 456 | }, |
| 457 | } |
| 458 | |
| 459 | java_sdk_library_import { |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 460 | name: "mysdk_mysdklibrary@current", |
| 461 | sdk_member_name: "mysdklibrary", |
| 462 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 463 | apex_available: ["myapex"], |
Paul Duffin | f4600f6 | 2021-05-13 22:34:45 +0100 | [diff] [blame] | 464 | shared_library: false, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 465 | public: { |
| 466 | jars: ["sdk_library/public/mysdklibrary-stubs.jar"], |
| 467 | stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"], |
| 468 | current_api: "sdk_library/public/mysdklibrary.txt", |
| 469 | removed_api: "sdk_library/public/mysdklibrary-removed.txt", |
| 470 | sdk_version: "current", |
| 471 | }, |
| 472 | } |
| 473 | |
| 474 | java_sdk_library_import { |
| 475 | name: "mysdk_mycoreplatform@current", |
| 476 | sdk_member_name: "mycoreplatform", |
| 477 | visibility: ["//visibility:public"], |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 478 | apex_available: ["myapex"], |
Paul Duffin | ea8f808 | 2021-06-24 13:25:57 +0100 | [diff] [blame] | 479 | shared_library: true, |
| 480 | compile_dex: true, |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 481 | public: { |
| 482 | jars: ["sdk_library/public/mycoreplatform-stubs.jar"], |
| 483 | stub_srcs: ["sdk_library/public/mycoreplatform_stub_sources"], |
| 484 | current_api: "sdk_library/public/mycoreplatform.txt", |
| 485 | removed_api: "sdk_library/public/mycoreplatform-removed.txt", |
| 486 | sdk_version: "current", |
| 487 | }, |
| 488 | } |
| 489 | |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 490 | sdk_snapshot { |
| 491 | name: "mysdk@current", |
| 492 | visibility: ["//visibility:public"], |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 493 | bootclasspath_fragments: ["mysdk_mybootclasspathfragment@current"], |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 494 | java_boot_libs: ["mysdk_mybootlib@current"], |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 495 | java_sdk_libs: [ |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 496 | "mysdk_myothersdklibrary@current", |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 497 | "mysdk_mysdklibrary@current", |
| 498 | "mysdk_mycoreplatform@current", |
| 499 | ], |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 500 | } |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 501 | `), |
Paul Duffin | a57835e | 2021-04-19 13:23:06 +0100 | [diff] [blame] | 502 | checkAllCopyRules(` |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 503 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/annotation-flags.csv -> hiddenapi/annotation-flags.csv |
| 504 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/metadata.csv -> hiddenapi/metadata.csv |
| 505 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/index.csv -> hiddenapi/index.csv |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 506 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/signature-patterns.csv -> hiddenapi/signature-patterns.csv |
Paul Duffin | 280bae6 | 2021-07-20 18:03:53 +0100 | [diff] [blame] | 507 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-stub-flags.csv -> hiddenapi/filtered-stub-flags.csv |
| 508 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-flags.csv -> hiddenapi/filtered-flags.csv |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 509 | .intermediates/mysdk/common_os/empty -> java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar |
Paul Duffin | a10bd3c | 2021-05-12 13:46:54 +0100 | [diff] [blame] | 510 | .intermediates/myothersdklibrary.stubs/android_common/javac/myothersdklibrary.stubs.jar -> sdk_library/public/myothersdklibrary-stubs.jar |
| 511 | .intermediates/myothersdklibrary.stubs.source/android_common/metalava/myothersdklibrary.stubs.source_api.txt -> sdk_library/public/myothersdklibrary.txt |
| 512 | .intermediates/myothersdklibrary.stubs.source/android_common/metalava/myothersdklibrary.stubs.source_removed.txt -> sdk_library/public/myothersdklibrary-removed.txt |
Paul Duffin | 895c714 | 2021-04-25 13:40:15 +0100 | [diff] [blame] | 513 | .intermediates/mysdklibrary.stubs/android_common/javac/mysdklibrary.stubs.jar -> sdk_library/public/mysdklibrary-stubs.jar |
| 514 | .intermediates/mysdklibrary.stubs.source/android_common/metalava/mysdklibrary.stubs.source_api.txt -> sdk_library/public/mysdklibrary.txt |
| 515 | .intermediates/mysdklibrary.stubs.source/android_common/metalava/mysdklibrary.stubs.source_removed.txt -> sdk_library/public/mysdklibrary-removed.txt |
| 516 | .intermediates/mycoreplatform.stubs/android_common/javac/mycoreplatform.stubs.jar -> sdk_library/public/mycoreplatform-stubs.jar |
| 517 | .intermediates/mycoreplatform.stubs.source/android_common/metalava/mycoreplatform.stubs.source_api.txt -> sdk_library/public/mycoreplatform.txt |
| 518 | .intermediates/mycoreplatform.stubs.source/android_common/metalava/mycoreplatform.stubs.source_removed.txt -> sdk_library/public/mycoreplatform-removed.txt |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 519 | `), |
| 520 | snapshotTestPreparer(checkSnapshotWithoutSource, preparerForSnapshot), |
Paul Duffin | d061d40 | 2021-06-07 21:36:01 +0100 | [diff] [blame] | 521 | snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) { |
| 522 | module := result.ModuleForTests("platform-bootclasspath", "android_common") |
| 523 | var rule android.TestingBuildParams |
| 524 | rule = module.Output("out/soong/hiddenapi/hiddenapi-flags.csv") |
| 525 | java.CheckHiddenAPIRuleInputs(t, "monolithic flags", ` |
| 526 | out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/hiddenapi-monolithic/annotation-flags-from-classes.csv |
| 527 | out/soong/hiddenapi/hiddenapi-stub-flags.txt |
| 528 | snapshot/hiddenapi/annotation-flags.csv |
| 529 | `, rule) |
| 530 | |
| 531 | rule = module.Output("out/soong/hiddenapi/hiddenapi-unsupported.csv") |
| 532 | java.CheckHiddenAPIRuleInputs(t, "monolithic metadata", ` |
| 533 | out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/hiddenapi-monolithic/metadata-from-classes.csv |
| 534 | snapshot/hiddenapi/metadata.csv |
| 535 | `, rule) |
| 536 | |
| 537 | rule = module.Output("out/soong/hiddenapi/hiddenapi-index.csv") |
| 538 | java.CheckHiddenAPIRuleInputs(t, "monolithic index", ` |
| 539 | out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/hiddenapi-monolithic/index-from-classes.csv |
| 540 | snapshot/hiddenapi/index.csv |
| 541 | `, rule) |
Paul Duffin | 630b11e | 2021-07-15 13:35:26 +0100 | [diff] [blame] | 542 | |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 543 | rule = module.Output("out/soong/hiddenapi/hiddenapi-flags.csv.valid") |
Paul Duffin | 280bae6 | 2021-07-20 18:03:53 +0100 | [diff] [blame] | 544 | android.AssertStringDoesContain(t, "verify-overlaps", rule.RuleParams.Command, " snapshot/hiddenapi/filtered-flags.csv:snapshot/hiddenapi/signature-patterns.csv ") |
Paul Duffin | d061d40 | 2021-06-07 21:36:01 +0100 | [diff] [blame] | 545 | }), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 546 | snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot), |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 547 | snapshotTestChecker(checkSnapshotWithSourcePreferred, func(t *testing.T, result *android.TestResult) { |
| 548 | module := result.ModuleForTests("platform-bootclasspath", "android_common") |
| 549 | rule := module.Output("out/soong/hiddenapi/hiddenapi-flags.csv.valid") |
Paul Duffin | 280bae6 | 2021-07-20 18:03:53 +0100 | [diff] [blame] | 550 | android.AssertStringDoesContain(t, "verify-overlaps", rule.RuleParams.Command, " out/soong/.intermediates/mybootclasspathfragment/android_common_myapex/modular-hiddenapi/filtered-flags.csv:out/soong/.intermediates/mybootclasspathfragment/android_common_myapex/modular-hiddenapi/signature-patterns.csv ") |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 551 | }), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 552 | snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot), |
| 553 | ) |
Paul Duffin | f7f65da | 2021-03-10 15:00:46 +0000 | [diff] [blame] | 554 | } |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 555 | |
Paul Duffin | 51227d8 | 2021-05-18 12:54:27 +0100 | [diff] [blame] | 556 | // TestSnapshotWithBootClasspathFragment_Fragments makes sure that the fragments property of a |
| 557 | // bootclasspath_fragment is correctly output to the sdk snapshot. |
| 558 | func TestSnapshotWithBootClasspathFragment_Fragments(t *testing.T) { |
| 559 | result := android.GroupFixturePreparers( |
| 560 | prepareForSdkTestWithJava, |
| 561 | java.PrepareForTestWithJavaDefaultModules, |
| 562 | java.PrepareForTestWithJavaSdkLibraryFiles, |
| 563 | java.FixtureWithLastReleaseApis("mysdklibrary", "myothersdklibrary"), |
satayev | abcd597 | 2021-08-06 17:49:46 +0100 | [diff] [blame] | 564 | java.FixtureConfigureApexBootJars("someapex:mysdklibrary", "myotherapex:myotherlib"), |
Paul Duffin | 51227d8 | 2021-05-18 12:54:27 +0100 | [diff] [blame] | 565 | prepareForSdkTestWithApex, |
| 566 | |
| 567 | // Some additional files needed for the myotherapex. |
| 568 | android.FixtureMergeMockFs(android.MockFS{ |
| 569 | "system/sepolicy/apex/myotherapex-file_contexts": nil, |
| 570 | "myotherapex/apex_manifest.json": nil, |
| 571 | "myotherapex/Test.java": nil, |
| 572 | }), |
| 573 | |
| 574 | android.FixtureAddTextFile("myotherapex/Android.bp", ` |
| 575 | apex { |
| 576 | name: "myotherapex", |
| 577 | key: "myapex.key", |
| 578 | min_sdk_version: "2", |
| 579 | bootclasspath_fragments: ["myotherbootclasspathfragment"], |
| 580 | } |
| 581 | |
| 582 | bootclasspath_fragment { |
| 583 | name: "myotherbootclasspathfragment", |
| 584 | apex_available: ["myotherapex"], |
| 585 | contents: [ |
| 586 | "myotherlib", |
| 587 | ], |
| 588 | } |
| 589 | |
| 590 | java_library { |
| 591 | name: "myotherlib", |
| 592 | apex_available: ["myotherapex"], |
| 593 | srcs: ["Test.java"], |
| 594 | min_sdk_version: "2", |
| 595 | permitted_packages: ["myothersdklibrary"], |
| 596 | compile_dex: true, |
| 597 | } |
| 598 | `), |
| 599 | |
| 600 | android.FixtureWithRootAndroidBp(` |
| 601 | sdk { |
| 602 | name: "mysdk", |
| 603 | bootclasspath_fragments: ["mybootclasspathfragment"], |
| 604 | } |
| 605 | |
| 606 | bootclasspath_fragment { |
| 607 | name: "mybootclasspathfragment", |
| 608 | contents: [ |
| 609 | "mysdklibrary", |
| 610 | ], |
| 611 | fragments: [ |
| 612 | { |
| 613 | apex: "myotherapex", |
| 614 | module: "myotherbootclasspathfragment" |
| 615 | }, |
| 616 | ], |
| 617 | } |
| 618 | |
| 619 | java_sdk_library { |
| 620 | name: "mysdklibrary", |
| 621 | srcs: ["Test.java"], |
| 622 | shared_library: false, |
| 623 | public: {enabled: true}, |
| 624 | min_sdk_version: "2", |
| 625 | } |
| 626 | `), |
| 627 | ).RunTest(t) |
| 628 | |
| 629 | // A preparer to update the test fixture used when processing an unpackage snapshot. |
| 630 | preparerForSnapshot := fixtureAddPrebuiltApexForBootclasspathFragment("myapex", "mybootclasspathfragment") |
| 631 | |
| 632 | CheckSnapshot(t, result, "mysdk", "", |
| 633 | checkUnversionedAndroidBpContents(` |
| 634 | // This is auto-generated. DO NOT EDIT. |
| 635 | |
| 636 | prebuilt_bootclasspath_fragment { |
| 637 | name: "mybootclasspathfragment", |
| 638 | prefer: false, |
| 639 | visibility: ["//visibility:public"], |
| 640 | apex_available: ["//apex_available:platform"], |
| 641 | contents: ["mysdklibrary"], |
| 642 | fragments: [ |
| 643 | { |
| 644 | apex: "myotherapex", |
| 645 | module: "myotherbootclasspathfragment", |
| 646 | }, |
| 647 | ], |
| 648 | hidden_api: { |
Paul Duffin | 51227d8 | 2021-05-18 12:54:27 +0100 | [diff] [blame] | 649 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 650 | metadata: "hiddenapi/metadata.csv", |
| 651 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 652 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 653 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 654 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | 51227d8 | 2021-05-18 12:54:27 +0100 | [diff] [blame] | 655 | }, |
| 656 | } |
| 657 | |
| 658 | java_sdk_library_import { |
| 659 | name: "mysdklibrary", |
| 660 | prefer: false, |
| 661 | visibility: ["//visibility:public"], |
| 662 | apex_available: ["//apex_available:platform"], |
| 663 | shared_library: false, |
| 664 | public: { |
| 665 | jars: ["sdk_library/public/mysdklibrary-stubs.jar"], |
| 666 | stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"], |
| 667 | current_api: "sdk_library/public/mysdklibrary.txt", |
| 668 | removed_api: "sdk_library/public/mysdklibrary-removed.txt", |
| 669 | sdk_version: "current", |
| 670 | }, |
| 671 | } |
| 672 | `), |
| 673 | snapshotTestPreparer(checkSnapshotWithoutSource, preparerForSnapshot), |
| 674 | snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot), |
| 675 | snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot), |
| 676 | ) |
| 677 | } |
| 678 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 679 | // Test that bootclasspath_fragment works with sdk. |
| 680 | func TestBasicSdkWithBootclasspathFragment(t *testing.T) { |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 681 | android.GroupFixturePreparers( |
| 682 | prepareForSdkTestWithApex, |
| 683 | prepareForSdkTestWithJava, |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 684 | android.FixtureAddFile("java/mybootlib.jar", nil), |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 685 | android.FixtureWithRootAndroidBp(` |
| 686 | sdk { |
| 687 | name: "mysdk", |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 688 | bootclasspath_fragments: ["mybootclasspathfragment"], |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 689 | } |
| 690 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 691 | bootclasspath_fragment { |
| 692 | name: "mybootclasspathfragment", |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 693 | image_name: "art", |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 694 | contents: ["mybootlib"], |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 695 | apex_available: ["myapex"], |
| 696 | } |
| 697 | |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 698 | java_library { |
| 699 | name: "mybootlib", |
| 700 | apex_available: ["myapex"], |
| 701 | srcs: ["Test.java"], |
| 702 | system_modules: "none", |
| 703 | sdk_version: "none", |
| 704 | min_sdk_version: "1", |
| 705 | compile_dex: true, |
| 706 | } |
| 707 | |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 708 | sdk_snapshot { |
| 709 | name: "mysdk@1", |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 710 | bootclasspath_fragments: ["mysdk_mybootclasspathfragment@1"], |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 711 | } |
| 712 | |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 713 | prebuilt_bootclasspath_fragment { |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 714 | name: "mysdk_mybootclasspathfragment@1", |
Paul Duffin | 0b28a8d | 2021-04-21 23:38:34 +0100 | [diff] [blame] | 715 | sdk_member_name: "mybootclasspathfragment", |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 716 | prefer: false, |
| 717 | visibility: ["//visibility:public"], |
| 718 | apex_available: [ |
| 719 | "myapex", |
| 720 | ], |
| 721 | image_name: "art", |
Paul Duffin | 8018e50 | 2021-05-21 19:28:09 +0100 | [diff] [blame] | 722 | contents: ["mysdk_mybootlib@1"], |
| 723 | } |
| 724 | |
| 725 | java_import { |
| 726 | name: "mysdk_mybootlib@1", |
| 727 | sdk_member_name: "mybootlib", |
| 728 | visibility: ["//visibility:public"], |
| 729 | apex_available: ["com.android.art"], |
| 730 | jars: ["java/mybootlib.jar"], |
Paul Duffin | 04b4a19 | 2021-03-18 11:05:31 +0000 | [diff] [blame] | 731 | } |
| 732 | `), |
| 733 | ).RunTest(t) |
| 734 | } |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 735 | |
| 736 | func TestSnapshotWithBootclasspathFragment_HiddenAPI(t *testing.T) { |
| 737 | result := android.GroupFixturePreparers( |
| 738 | prepareForSdkTestWithJava, |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 739 | java.PrepareForTestWithJavaDefaultModules, |
| 740 | java.PrepareForTestWithJavaSdkLibraryFiles, |
| 741 | java.FixtureWithLastReleaseApis("mysdklibrary"), |
satayev | d604b21 | 2021-07-21 14:23:52 +0100 | [diff] [blame] | 742 | java.FixtureConfigureApexBootJars("myapex:mybootlib"), |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 743 | prepareForSdkTestWithApex, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 744 | |
| 745 | // Add a platform_bootclasspath that depends on the fragment. |
| 746 | fixtureAddPlatformBootclasspathForBootclasspathFragment("myapex", "mybootclasspathfragment"), |
| 747 | |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 748 | android.MockFS{ |
| 749 | "my-blocked.txt": nil, |
| 750 | "my-max-target-o-low-priority.txt": nil, |
| 751 | "my-max-target-p.txt": nil, |
| 752 | "my-max-target-q.txt": nil, |
| 753 | "my-max-target-r-low-priority.txt": nil, |
| 754 | "my-removed.txt": nil, |
| 755 | "my-unsupported-packages.txt": nil, |
| 756 | "my-unsupported.txt": nil, |
| 757 | }.AddToFixture(), |
| 758 | android.FixtureWithRootAndroidBp(` |
| 759 | sdk { |
| 760 | name: "mysdk", |
| 761 | bootclasspath_fragments: ["mybootclasspathfragment"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 762 | } |
| 763 | |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 764 | apex { |
| 765 | name: "myapex", |
| 766 | key: "myapex.key", |
| 767 | min_sdk_version: "1", |
| 768 | bootclasspath_fragments: ["mybootclasspathfragment"], |
| 769 | } |
| 770 | |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 771 | bootclasspath_fragment { |
| 772 | name: "mybootclasspathfragment", |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 773 | apex_available: ["myapex"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 774 | contents: ["mybootlib"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 775 | api: { |
| 776 | stub_libs: ["mysdklibrary"], |
| 777 | }, |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 778 | hidden_api: { |
| 779 | unsupported: [ |
| 780 | "my-unsupported.txt", |
| 781 | ], |
| 782 | removed: [ |
| 783 | "my-removed.txt", |
| 784 | ], |
| 785 | max_target_r_low_priority: [ |
| 786 | "my-max-target-r-low-priority.txt", |
| 787 | ], |
| 788 | max_target_q: [ |
| 789 | "my-max-target-q.txt", |
| 790 | ], |
| 791 | max_target_p: [ |
| 792 | "my-max-target-p.txt", |
| 793 | ], |
| 794 | max_target_o_low_priority: [ |
| 795 | "my-max-target-o-low-priority.txt", |
| 796 | ], |
| 797 | blocked: [ |
| 798 | "my-blocked.txt", |
| 799 | ], |
| 800 | unsupported_packages: [ |
| 801 | "my-unsupported-packages.txt", |
| 802 | ], |
| 803 | }, |
| 804 | } |
| 805 | |
| 806 | java_library { |
| 807 | name: "mybootlib", |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 808 | apex_available: ["myapex"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 809 | srcs: ["Test.java"], |
| 810 | system_modules: "none", |
| 811 | sdk_version: "none", |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 812 | min_sdk_version: "1", |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 813 | compile_dex: true, |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 814 | permitted_packages: ["mybootlib"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 815 | } |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 816 | |
| 817 | java_sdk_library { |
| 818 | name: "mysdklibrary", |
| 819 | srcs: ["Test.java"], |
| 820 | compile_dex: true, |
| 821 | public: {enabled: true}, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 822 | permitted_packages: ["mysdklibrary"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 823 | } |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 824 | `), |
| 825 | ).RunTest(t) |
| 826 | |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 827 | // A preparer to update the test fixture used when processing an unpackage snapshot. |
| 828 | preparerForSnapshot := fixtureAddPrebuiltApexForBootclasspathFragment("myapex", "mybootclasspathfragment") |
| 829 | |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 830 | CheckSnapshot(t, result, "mysdk", "", |
| 831 | checkUnversionedAndroidBpContents(` |
| 832 | // This is auto-generated. DO NOT EDIT. |
| 833 | |
| 834 | prebuilt_bootclasspath_fragment { |
| 835 | name: "mybootclasspathfragment", |
| 836 | prefer: false, |
| 837 | visibility: ["//visibility:public"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 838 | apex_available: ["myapex"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 839 | contents: ["mybootlib"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 840 | api: { |
| 841 | stub_libs: ["mysdklibrary"], |
| 842 | }, |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 843 | hidden_api: { |
| 844 | unsupported: ["hiddenapi/my-unsupported.txt"], |
| 845 | removed: ["hiddenapi/my-removed.txt"], |
| 846 | max_target_r_low_priority: ["hiddenapi/my-max-target-r-low-priority.txt"], |
| 847 | max_target_q: ["hiddenapi/my-max-target-q.txt"], |
| 848 | max_target_p: ["hiddenapi/my-max-target-p.txt"], |
| 849 | max_target_o_low_priority: ["hiddenapi/my-max-target-o-low-priority.txt"], |
| 850 | blocked: ["hiddenapi/my-blocked.txt"], |
| 851 | unsupported_packages: ["hiddenapi/my-unsupported-packages.txt"], |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 852 | annotation_flags: "hiddenapi/annotation-flags.csv", |
| 853 | metadata: "hiddenapi/metadata.csv", |
| 854 | index: "hiddenapi/index.csv", |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 855 | signature_patterns: "hiddenapi/signature-patterns.csv", |
Paul Duffin | 191be3a | 2021-08-10 16:14:16 +0100 | [diff] [blame] | 856 | filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv", |
| 857 | filtered_flags: "hiddenapi/filtered-flags.csv", |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 858 | }, |
| 859 | } |
| 860 | |
| 861 | java_import { |
| 862 | name: "mybootlib", |
| 863 | prefer: false, |
| 864 | visibility: ["//visibility:public"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 865 | apex_available: ["myapex"], |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 866 | jars: ["java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 867 | permitted_packages: ["mybootlib"], |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 868 | } |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 869 | |
| 870 | java_sdk_library_import { |
| 871 | name: "mysdklibrary", |
| 872 | prefer: false, |
| 873 | visibility: ["//visibility:public"], |
| 874 | apex_available: ["//apex_available:platform"], |
| 875 | shared_library: true, |
| 876 | compile_dex: true, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame] | 877 | permitted_packages: ["mysdklibrary"], |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 878 | public: { |
| 879 | jars: ["sdk_library/public/mysdklibrary-stubs.jar"], |
| 880 | stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"], |
| 881 | current_api: "sdk_library/public/mysdklibrary.txt", |
| 882 | removed_api: "sdk_library/public/mysdklibrary-removed.txt", |
| 883 | sdk_version: "current", |
| 884 | }, |
| 885 | } |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 886 | `), |
| 887 | checkAllCopyRules(` |
| 888 | my-unsupported.txt -> hiddenapi/my-unsupported.txt |
| 889 | my-removed.txt -> hiddenapi/my-removed.txt |
| 890 | my-max-target-r-low-priority.txt -> hiddenapi/my-max-target-r-low-priority.txt |
| 891 | my-max-target-q.txt -> hiddenapi/my-max-target-q.txt |
| 892 | my-max-target-p.txt -> hiddenapi/my-max-target-p.txt |
| 893 | my-max-target-o-low-priority.txt -> hiddenapi/my-max-target-o-low-priority.txt |
| 894 | my-blocked.txt -> hiddenapi/my-blocked.txt |
| 895 | my-unsupported-packages.txt -> hiddenapi/my-unsupported-packages.txt |
Paul Duffin | 2fef136 | 2021-04-15 13:32:00 +0100 | [diff] [blame] | 896 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/annotation-flags.csv -> hiddenapi/annotation-flags.csv |
| 897 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/metadata.csv -> hiddenapi/metadata.csv |
| 898 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/index.csv -> hiddenapi/index.csv |
Paul Duffin | 8d007e9 | 2021-07-22 12:00:49 +0100 | [diff] [blame] | 899 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/signature-patterns.csv -> hiddenapi/signature-patterns.csv |
Paul Duffin | 280bae6 | 2021-07-20 18:03:53 +0100 | [diff] [blame] | 900 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-stub-flags.csv -> hiddenapi/filtered-stub-flags.csv |
| 901 | .intermediates/mybootclasspathfragment/android_common/modular-hiddenapi/filtered-flags.csv -> hiddenapi/filtered-flags.csv |
Paul Duffin | 5c21145 | 2021-07-15 12:42:44 +0100 | [diff] [blame] | 902 | .intermediates/mysdk/common_os/empty -> java_boot_libs/snapshot/jars/are/invalid/mybootlib.jar |
Paul Duffin | 475daaf | 2021-05-13 00:57:55 +0100 | [diff] [blame] | 903 | .intermediates/mysdklibrary.stubs/android_common/javac/mysdklibrary.stubs.jar -> sdk_library/public/mysdklibrary-stubs.jar |
| 904 | .intermediates/mysdklibrary.stubs.source/android_common/metalava/mysdklibrary.stubs.source_api.txt -> sdk_library/public/mysdklibrary.txt |
| 905 | .intermediates/mysdklibrary.stubs.source/android_common/metalava/mysdklibrary.stubs.source_removed.txt -> sdk_library/public/mysdklibrary-removed.txt |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 906 | `), |
Paul Duffin | 7c47515 | 2021-06-09 16:17:58 +0100 | [diff] [blame] | 907 | snapshotTestPreparer(checkSnapshotWithoutSource, preparerForSnapshot), |
| 908 | snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot), |
| 909 | snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot), |
Paul Duffin | 7c95555 | 2021-04-19 13:23:53 +0100 | [diff] [blame] | 910 | ) |
| 911 | } |