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