Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | |
| 17 | import ( |
| 18 | "testing" |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 19 | |
Paul Duffin | 4a2a29c | 2021-03-09 22:27:13 +0000 | [diff] [blame] | 20 | "android/soong/android" |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 21 | "android/soong/java" |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 22 | ) |
| 23 | |
Paul Duffin | d14cbc1 | 2021-03-18 09:14:23 +0000 | [diff] [blame] | 24 | var prepareForSdkTestWithJava = android.GroupFixturePreparers( |
| 25 | java.PrepareForTestWithJavaBuildComponents, |
| 26 | PrepareForTestWithSdkBuildComponents, |
Paul Duffin | db462dd | 2021-03-21 22:01:55 +0000 | [diff] [blame] | 27 | |
| 28 | // Ensure that all source paths are provided. This helps ensure that the snapshot generation is |
| 29 | // consistent and all files referenced from the snapshot's Android.bp file have actually been |
| 30 | // copied into the snapshot. |
| 31 | android.PrepareForTestDisallowNonExistentPaths, |
| 32 | |
| 33 | // Files needs by most of the tests. |
| 34 | android.MockFS{ |
| 35 | "Test.java": nil, |
| 36 | }.AddToFixture(), |
Paul Duffin | d14cbc1 | 2021-03-18 09:14:23 +0000 | [diff] [blame] | 37 | ) |
| 38 | |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 39 | var prepareForSdkTestWithJavaSdkLibrary = android.GroupFixturePreparers( |
| 40 | prepareForSdkTestWithJava, |
| 41 | java.PrepareForTestWithJavaDefaultModules, |
| 42 | java.PrepareForTestWithJavaSdkLibraryFiles, |
| 43 | java.FixtureWithLastReleaseApis("myjavalib"), |
| 44 | ) |
| 45 | |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 46 | // Contains tests for SDK members provided by the java package. |
| 47 | |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 48 | func TestSdkDependsOnSourceEvenWhenPrebuiltPreferred(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 49 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 50 | sdk { |
| 51 | name: "mysdk", |
| 52 | java_header_libs: ["sdkmember"], |
| 53 | } |
| 54 | |
| 55 | java_library { |
| 56 | name: "sdkmember", |
| 57 | srcs: ["Test.java"], |
| 58 | system_modules: "none", |
| 59 | sdk_version: "none", |
| 60 | } |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 61 | `) |
| 62 | |
| 63 | // Make sure that the mysdk module depends on "sdkmember" and not "prebuilt_sdkmember". |
Paul Duffin | 1822a0a | 2021-03-21 12:56:33 +0000 | [diff] [blame] | 64 | sdkChecker := func(t *testing.T, result *android.TestResult) { |
| 65 | java.CheckModuleDependencies(t, result.TestContext, "mysdk", "android_common", []string{"sdkmember"}) |
| 66 | } |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 67 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 68 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | 1822a0a | 2021-03-21 12:56:33 +0000 | [diff] [blame] | 69 | snapshotTestChecker(checkSnapshotWithSourcePreferred, sdkChecker), |
| 70 | snapshotTestChecker(checkSnapshotPreferredWithSource, sdkChecker), |
| 71 | ) |
Paul Duffin | cee7e66 | 2020-07-09 17:32:57 +0100 | [diff] [blame] | 72 | } |
| 73 | |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 74 | func TestBasicSdkWithJavaLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 75 | result := android.GroupFixturePreparers( |
| 76 | prepareForSdkTestWithJava, |
| 77 | prepareForSdkTestWithApex, |
| 78 | ).RunTestWithBp(t, ` |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 79 | sdk { |
| 80 | name: "mysdk", |
Jiyong Park | 0f80c18 | 2020-01-31 02:49:53 +0900 | [diff] [blame] | 81 | java_header_libs: ["sdkmember"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | sdk_snapshot { |
| 85 | name: "mysdk@1", |
Paul Duffin | 525a590 | 2021-05-06 16:33:52 +0100 | [diff] [blame] | 86 | java_header_libs: ["sdkmember_mysdk@1"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | sdk_snapshot { |
| 90 | name: "mysdk@2", |
Paul Duffin | 525a590 | 2021-05-06 16:33:52 +0100 | [diff] [blame] | 91 | java_header_libs: ["sdkmember_mysdk@2"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 92 | } |
| 93 | |
Jiyong Park | 0f80c18 | 2020-01-31 02:49:53 +0900 | [diff] [blame] | 94 | java_library { |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 95 | name: "sdkmember", |
Jiyong Park | 0f80c18 | 2020-01-31 02:49:53 +0900 | [diff] [blame] | 96 | srcs: ["Test.java"], |
| 97 | system_modules: "none", |
| 98 | sdk_version: "none", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 99 | host_supported: true, |
| 100 | } |
| 101 | |
| 102 | java_import { |
Paul Duffin | 525a590 | 2021-05-06 16:33:52 +0100 | [diff] [blame] | 103 | name: "sdkmember_mysdk@1", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 104 | sdk_member_name: "sdkmember", |
| 105 | host_supported: true, |
| 106 | } |
| 107 | |
| 108 | java_import { |
Paul Duffin | 525a590 | 2021-05-06 16:33:52 +0100 | [diff] [blame] | 109 | name: "sdkmember_mysdk@2", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 110 | sdk_member_name: "sdkmember", |
| 111 | host_supported: true, |
| 112 | } |
| 113 | |
| 114 | java_library { |
| 115 | name: "myjavalib", |
| 116 | srcs: ["Test.java"], |
| 117 | libs: ["sdkmember"], |
| 118 | system_modules: "none", |
| 119 | sdk_version: "none", |
| 120 | compile_dex: true, |
| 121 | host_supported: true, |
Anton Hansson | eec79eb | 2020-01-10 15:12:39 +0000 | [diff] [blame] | 122 | apex_available: [ |
| 123 | "myapex", |
| 124 | "myapex2", |
| 125 | ], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | apex { |
| 129 | name: "myapex", |
| 130 | java_libs: ["myjavalib"], |
| 131 | uses_sdks: ["mysdk@1"], |
| 132 | key: "myapex.key", |
| 133 | certificate: ":myapex.cert", |
Mathew Inwood | f8dcf5e | 2021-02-16 11:40:16 +0000 | [diff] [blame] | 134 | updatable: false, |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | apex { |
| 138 | name: "myapex2", |
| 139 | java_libs: ["myjavalib"], |
| 140 | uses_sdks: ["mysdk@2"], |
| 141 | key: "myapex.key", |
| 142 | certificate: ":myapex.cert", |
Mathew Inwood | f8dcf5e | 2021-02-16 11:40:16 +0000 | [diff] [blame] | 143 | updatable: false, |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 144 | } |
| 145 | `) |
| 146 | |
Paul Duffin | 525a590 | 2021-05-06 16:33:52 +0100 | [diff] [blame] | 147 | sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk@1", "android_common").Rule("combineJar").Output |
| 148 | sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk@2", "android_common").Rule("combineJar").Output |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 149 | |
Paul Duffin | 8306f25 | 2021-03-11 12:18:24 +0000 | [diff] [blame] | 150 | javalibForMyApex := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_1") |
| 151 | javalibForMyApex2 := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_2") |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 152 | |
| 153 | // Depending on the uses_sdks value, different libs are linked |
| 154 | ensureListContains(t, pathsToStrings(javalibForMyApex.Rule("javac").Implicits), sdkMemberV1.String()) |
| 155 | ensureListContains(t, pathsToStrings(javalibForMyApex2.Rule("javac").Implicits), sdkMemberV2.String()) |
| 156 | } |
| 157 | |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 158 | func TestSnapshotWithJavaHeaderLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 159 | result := android.GroupFixturePreparers( |
| 160 | prepareForSdkTestWithJava, |
| 161 | android.FixtureAddFile("aidl/foo/bar/Test.aidl", nil), |
| 162 | ).RunTestWithBp(t, ` |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 163 | sdk { |
| 164 | name: "mysdk", |
| 165 | java_header_libs: ["myjavalib"], |
| 166 | } |
| 167 | |
| 168 | java_library { |
| 169 | name: "myjavalib", |
| 170 | srcs: ["Test.java"], |
| 171 | aidl: { |
| 172 | export_include_dirs: ["aidl"], |
| 173 | }, |
| 174 | system_modules: "none", |
| 175 | sdk_version: "none", |
| 176 | compile_dex: true, |
| 177 | host_supported: true, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 178 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 179 | } |
| 180 | `) |
| 181 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 182 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 183 | checkUnversionedAndroidBpContents(` |
| 184 | // This is auto-generated. DO NOT EDIT. |
| 185 | |
| 186 | java_import { |
| 187 | name: "myjavalib", |
| 188 | prefer: false, |
| 189 | visibility: ["//visibility:public"], |
| 190 | apex_available: ["//apex_available:platform"], |
| 191 | jars: ["java/myjavalib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 192 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 193 | } |
| 194 | `), |
| 195 | checkVersionedAndroidBpContents(` |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 196 | // This is auto-generated. DO NOT EDIT. |
| 197 | |
| 198 | java_import { |
| 199 | name: "mysdk_myjavalib@current", |
| 200 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 201 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 202 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 203 | jars: ["java/myjavalib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 204 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 205 | } |
| 206 | |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 207 | sdk_snapshot { |
| 208 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 209 | visibility: ["//visibility:public"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 210 | java_header_libs: ["mysdk_myjavalib@current"], |
| 211 | } |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 212 | `), |
| 213 | checkAllCopyRules(` |
| 214 | .intermediates/myjavalib/android_common/turbine-combined/myjavalib.jar -> java/myjavalib.jar |
| 215 | aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl |
| 216 | `), |
| 217 | ) |
| 218 | } |
| 219 | |
| 220 | func TestHostSnapshotWithJavaHeaderLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 221 | result := android.GroupFixturePreparers( |
| 222 | prepareForSdkTestWithJava, |
| 223 | android.FixtureAddFile("aidl/foo/bar/Test.aidl", nil), |
| 224 | ).RunTestWithBp(t, ` |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 225 | sdk { |
| 226 | name: "mysdk", |
| 227 | device_supported: false, |
| 228 | host_supported: true, |
| 229 | java_header_libs: ["myjavalib"], |
| 230 | } |
| 231 | |
| 232 | java_library { |
| 233 | name: "myjavalib", |
| 234 | device_supported: false, |
| 235 | host_supported: true, |
| 236 | srcs: ["Test.java"], |
| 237 | aidl: { |
| 238 | export_include_dirs: ["aidl"], |
| 239 | }, |
| 240 | system_modules: "none", |
| 241 | sdk_version: "none", |
| 242 | compile_dex: true, |
| 243 | } |
| 244 | `) |
| 245 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 246 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 247 | checkUnversionedAndroidBpContents(` |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 248 | // This is auto-generated. DO NOT EDIT. |
| 249 | |
| 250 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 251 | name: "myjavalib", |
| 252 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 253 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 254 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 255 | device_supported: false, |
| 256 | host_supported: true, |
| 257 | jars: ["java/myjavalib.jar"], |
| 258 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 259 | `), |
| 260 | checkVersionedAndroidBpContents(` |
| 261 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 262 | |
| 263 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 264 | name: "mysdk_myjavalib@current", |
| 265 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 266 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 267 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 268 | device_supported: false, |
| 269 | host_supported: true, |
| 270 | jars: ["java/myjavalib.jar"], |
| 271 | } |
| 272 | |
| 273 | sdk_snapshot { |
| 274 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 275 | visibility: ["//visibility:public"], |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 276 | device_supported: false, |
| 277 | host_supported: true, |
| 278 | java_header_libs: ["mysdk_myjavalib@current"], |
| 279 | } |
| 280 | `), |
| 281 | checkAllCopyRules(` |
| 282 | .intermediates/myjavalib/linux_glibc_common/javac/myjavalib.jar -> java/myjavalib.jar |
| 283 | aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl |
| 284 | `), |
| 285 | ) |
| 286 | } |
| 287 | |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 288 | func TestDeviceAndHostSnapshotWithJavaHeaderLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 289 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 290 | sdk { |
| 291 | name: "mysdk", |
| 292 | host_supported: true, |
| 293 | java_header_libs: ["myjavalib"], |
| 294 | } |
| 295 | |
| 296 | java_library { |
| 297 | name: "myjavalib", |
| 298 | host_supported: true, |
| 299 | srcs: ["Test.java"], |
| 300 | system_modules: "none", |
| 301 | sdk_version: "none", |
| 302 | compile_dex: true, |
| 303 | } |
| 304 | `) |
| 305 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 306 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 307 | checkUnversionedAndroidBpContents(` |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 308 | // This is auto-generated. DO NOT EDIT. |
| 309 | |
| 310 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 311 | name: "myjavalib", |
| 312 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 313 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 314 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 315 | host_supported: true, |
| 316 | target: { |
| 317 | android: { |
| 318 | jars: ["java/android/myjavalib.jar"], |
| 319 | }, |
| 320 | linux_glibc: { |
| 321 | jars: ["java/linux_glibc/myjavalib.jar"], |
| 322 | }, |
| 323 | }, |
| 324 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 325 | `), |
| 326 | checkVersionedAndroidBpContents(` |
| 327 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 328 | |
| 329 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 330 | name: "mysdk_myjavalib@current", |
| 331 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 332 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 333 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 334 | host_supported: true, |
| 335 | target: { |
| 336 | android: { |
| 337 | jars: ["java/android/myjavalib.jar"], |
| 338 | }, |
| 339 | linux_glibc: { |
| 340 | jars: ["java/linux_glibc/myjavalib.jar"], |
| 341 | }, |
| 342 | }, |
| 343 | } |
| 344 | |
| 345 | sdk_snapshot { |
| 346 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 347 | visibility: ["//visibility:public"], |
Paul Duffin | a04c107 | 2020-03-02 10:16:35 +0000 | [diff] [blame] | 348 | host_supported: true, |
| 349 | java_header_libs: ["mysdk_myjavalib@current"], |
| 350 | } |
| 351 | `), |
| 352 | checkAllCopyRules(` |
| 353 | .intermediates/myjavalib/android_common/turbine-combined/myjavalib.jar -> java/android/myjavalib.jar |
| 354 | .intermediates/myjavalib/linux_glibc_common/javac/myjavalib.jar -> java/linux_glibc/myjavalib.jar |
| 355 | `), |
| 356 | ) |
| 357 | } |
| 358 | |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 359 | func TestSnapshotWithJavaImplLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 360 | result := android.GroupFixturePreparers( |
| 361 | prepareForSdkTestWithJava, |
| 362 | android.FixtureAddFile("aidl/foo/bar/Test.aidl", nil), |
Paul Duffin | db462dd | 2021-03-21 22:01:55 +0000 | [diff] [blame] | 363 | android.FixtureAddFile("resource.txt", nil), |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 364 | ).RunTestWithBp(t, ` |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 365 | module_exports { |
| 366 | name: "myexports", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 367 | java_libs: ["myjavalib"], |
| 368 | } |
| 369 | |
| 370 | java_library { |
| 371 | name: "myjavalib", |
| 372 | srcs: ["Test.java"], |
Paul Duffin | 4e77284 | 2020-06-24 12:10:42 +0100 | [diff] [blame] | 373 | java_resources: ["resource.txt"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 374 | aidl: { |
| 375 | export_include_dirs: ["aidl"], |
| 376 | }, |
| 377 | system_modules: "none", |
| 378 | sdk_version: "none", |
| 379 | compile_dex: true, |
| 380 | host_supported: true, |
| 381 | } |
| 382 | `) |
| 383 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 384 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 385 | checkUnversionedAndroidBpContents(` |
| 386 | // This is auto-generated. DO NOT EDIT. |
| 387 | |
| 388 | java_import { |
| 389 | name: "myjavalib", |
| 390 | prefer: false, |
| 391 | visibility: ["//visibility:public"], |
| 392 | apex_available: ["//apex_available:platform"], |
| 393 | jars: ["java/myjavalib.jar"], |
| 394 | } |
| 395 | `), |
| 396 | checkVersionedAndroidBpContents(` |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 397 | // This is auto-generated. DO NOT EDIT. |
| 398 | |
| 399 | java_import { |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 400 | name: "myexports_myjavalib@current", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 401 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 402 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 403 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 404 | jars: ["java/myjavalib.jar"], |
| 405 | } |
| 406 | |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 407 | module_exports_snapshot { |
| 408 | name: "myexports@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 409 | visibility: ["//visibility:public"], |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 410 | java_libs: ["myexports_myjavalib@current"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 411 | } |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 412 | `), |
| 413 | checkAllCopyRules(` |
Paul Duffin | 4e77284 | 2020-06-24 12:10:42 +0100 | [diff] [blame] | 414 | .intermediates/myjavalib/android_common/withres/myjavalib.jar -> java/myjavalib.jar |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 415 | aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl |
| 416 | `), |
| 417 | ) |
| 418 | } |
| 419 | |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 420 | func TestSnapshotWithJavaBootLibrary(t *testing.T) { |
Paul Duffin | db462dd | 2021-03-21 22:01:55 +0000 | [diff] [blame] | 421 | result := android.GroupFixturePreparers( |
| 422 | prepareForSdkTestWithJava, |
| 423 | android.FixtureAddFile("aidl", nil), |
| 424 | android.FixtureAddFile("resource.txt", nil), |
| 425 | ).RunTestWithBp(t, ` |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 426 | module_exports { |
| 427 | name: "myexports", |
| 428 | java_boot_libs: ["myjavalib"], |
| 429 | } |
| 430 | |
| 431 | java_library { |
| 432 | name: "myjavalib", |
| 433 | srcs: ["Test.java"], |
| 434 | java_resources: ["resource.txt"], |
| 435 | // The aidl files should not be copied to the snapshot because a java_boot_libs member is not |
| 436 | // intended to be used for compiling Java, only for accessing the dex implementation jar. |
| 437 | aidl: { |
| 438 | export_include_dirs: ["aidl"], |
| 439 | }, |
| 440 | system_modules: "none", |
| 441 | sdk_version: "none", |
| 442 | compile_dex: true, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 443 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 444 | } |
| 445 | `) |
| 446 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 447 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 448 | checkUnversionedAndroidBpContents(` |
| 449 | // This is auto-generated. DO NOT EDIT. |
| 450 | |
| 451 | java_import { |
| 452 | name: "myjavalib", |
| 453 | prefer: false, |
| 454 | visibility: ["//visibility:public"], |
| 455 | apex_available: ["//apex_available:platform"], |
| 456 | jars: ["java/myjavalib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 457 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 458 | } |
| 459 | `), |
| 460 | checkVersionedAndroidBpContents(` |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 461 | // This is auto-generated. DO NOT EDIT. |
| 462 | |
| 463 | java_import { |
| 464 | name: "myexports_myjavalib@current", |
| 465 | sdk_member_name: "myjavalib", |
| 466 | visibility: ["//visibility:public"], |
| 467 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 22ff0aa | 2021-02-04 11:15:34 +0000 | [diff] [blame] | 468 | jars: ["java/myjavalib.jar"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 469 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 470 | } |
| 471 | |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 472 | module_exports_snapshot { |
| 473 | name: "myexports@current", |
| 474 | visibility: ["//visibility:public"], |
| 475 | java_boot_libs: ["myexports_myjavalib@current"], |
| 476 | } |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 477 | `), |
| 478 | checkAllCopyRules(` |
Paul Duffin | 22ff0aa | 2021-02-04 11:15:34 +0000 | [diff] [blame] | 479 | .intermediates/myjavalib/android_common/withres/myjavalib.jar -> java/myjavalib.jar |
Paul Duffin | db170e4 | 2020-12-08 17:48:25 +0000 | [diff] [blame] | 480 | `), |
| 481 | ) |
| 482 | } |
| 483 | |
Paul Duffin | a0dbf43 | 2019-12-05 11:25:53 +0000 | [diff] [blame] | 484 | func TestHostSnapshotWithJavaImplLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 485 | result := android.GroupFixturePreparers( |
| 486 | prepareForSdkTestWithJava, |
| 487 | android.FixtureAddFile("aidl/foo/bar/Test.aidl", nil), |
| 488 | ).RunTestWithBp(t, ` |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 489 | module_exports { |
| 490 | name: "myexports", |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 491 | device_supported: false, |
| 492 | host_supported: true, |
| 493 | java_libs: ["myjavalib"], |
| 494 | } |
| 495 | |
| 496 | java_library { |
| 497 | name: "myjavalib", |
| 498 | device_supported: false, |
| 499 | host_supported: true, |
| 500 | srcs: ["Test.java"], |
| 501 | aidl: { |
| 502 | export_include_dirs: ["aidl"], |
| 503 | }, |
| 504 | system_modules: "none", |
| 505 | sdk_version: "none", |
| 506 | compile_dex: true, |
| 507 | } |
| 508 | `) |
| 509 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 510 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 511 | checkUnversionedAndroidBpContents(` |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 512 | // This is auto-generated. DO NOT EDIT. |
| 513 | |
| 514 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 515 | name: "myjavalib", |
| 516 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 517 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 518 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 519 | device_supported: false, |
| 520 | host_supported: true, |
| 521 | jars: ["java/myjavalib.jar"], |
| 522 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 523 | `), |
| 524 | checkVersionedAndroidBpContents(` |
| 525 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 526 | |
| 527 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 528 | name: "myexports_myjavalib@current", |
| 529 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 530 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 531 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 532 | device_supported: false, |
| 533 | host_supported: true, |
| 534 | jars: ["java/myjavalib.jar"], |
| 535 | } |
| 536 | |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 537 | module_exports_snapshot { |
| 538 | name: "myexports@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 539 | visibility: ["//visibility:public"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 540 | device_supported: false, |
| 541 | host_supported: true, |
Paul Duffin | e602918 | 2019-12-16 17:43:48 +0000 | [diff] [blame] | 542 | java_libs: ["myexports_myjavalib@current"], |
Paul Duffin | a80fdec | 2019-12-03 15:25:00 +0000 | [diff] [blame] | 543 | } |
| 544 | `), |
| 545 | checkAllCopyRules(` |
| 546 | .intermediates/myjavalib/linux_glibc_common/javac/myjavalib.jar -> java/myjavalib.jar |
| 547 | aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl |
| 548 | `), |
| 549 | ) |
| 550 | } |
| 551 | |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 552 | func TestSnapshotWithJavaTest(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 553 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 554 | module_exports { |
| 555 | name: "myexports", |
| 556 | java_tests: ["myjavatests"], |
| 557 | } |
| 558 | |
| 559 | java_test { |
| 560 | name: "myjavatests", |
| 561 | srcs: ["Test.java"], |
| 562 | system_modules: "none", |
| 563 | sdk_version: "none", |
| 564 | compile_dex: true, |
| 565 | host_supported: true, |
| 566 | } |
| 567 | `) |
| 568 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 569 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 570 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 571 | // This is auto-generated. DO NOT EDIT. |
| 572 | |
| 573 | java_test_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 574 | name: "myjavatests", |
| 575 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 576 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 577 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 578 | jars: ["java/myjavatests.jar"], |
| 579 | test_config: "java/myjavatests-AndroidTest.xml", |
| 580 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 581 | `), |
| 582 | checkVersionedAndroidBpContents(` |
| 583 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 584 | |
| 585 | java_test_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 586 | name: "myexports_myjavatests@current", |
| 587 | sdk_member_name: "myjavatests", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 588 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 589 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 590 | jars: ["java/myjavatests.jar"], |
| 591 | test_config: "java/myjavatests-AndroidTest.xml", |
| 592 | } |
| 593 | |
| 594 | module_exports_snapshot { |
| 595 | name: "myexports@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 596 | visibility: ["//visibility:public"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 597 | java_tests: ["myexports_myjavatests@current"], |
| 598 | } |
| 599 | `), |
| 600 | checkAllCopyRules(` |
| 601 | .intermediates/myjavatests/android_common/javac/myjavatests.jar -> java/myjavatests.jar |
| 602 | .intermediates/myjavatests/android_common/myjavatests.config -> java/myjavatests-AndroidTest.xml |
| 603 | `), |
| 604 | ) |
| 605 | } |
| 606 | |
| 607 | func TestHostSnapshotWithJavaTest(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 608 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 609 | module_exports { |
| 610 | name: "myexports", |
| 611 | device_supported: false, |
| 612 | host_supported: true, |
| 613 | java_tests: ["myjavatests"], |
| 614 | } |
| 615 | |
| 616 | java_test { |
| 617 | name: "myjavatests", |
| 618 | device_supported: false, |
| 619 | host_supported: true, |
| 620 | srcs: ["Test.java"], |
| 621 | system_modules: "none", |
| 622 | sdk_version: "none", |
| 623 | compile_dex: true, |
| 624 | } |
| 625 | `) |
| 626 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 627 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 628 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 629 | // This is auto-generated. DO NOT EDIT. |
| 630 | |
| 631 | java_test_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 632 | name: "myjavatests", |
| 633 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 634 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 635 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 636 | device_supported: false, |
| 637 | host_supported: true, |
| 638 | jars: ["java/myjavatests.jar"], |
| 639 | test_config: "java/myjavatests-AndroidTest.xml", |
| 640 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 641 | `), |
| 642 | checkVersionedAndroidBpContents(` |
| 643 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 644 | |
| 645 | java_test_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 646 | name: "myexports_myjavatests@current", |
| 647 | sdk_member_name: "myjavatests", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 648 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 649 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 650 | device_supported: false, |
| 651 | host_supported: true, |
| 652 | jars: ["java/myjavatests.jar"], |
| 653 | test_config: "java/myjavatests-AndroidTest.xml", |
| 654 | } |
| 655 | |
| 656 | module_exports_snapshot { |
| 657 | name: "myexports@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 658 | visibility: ["//visibility:public"], |
Paul Duffin | 1b82e6a | 2019-12-03 18:06:47 +0000 | [diff] [blame] | 659 | device_supported: false, |
| 660 | host_supported: true, |
| 661 | java_tests: ["myexports_myjavatests@current"], |
| 662 | } |
| 663 | `), |
| 664 | checkAllCopyRules(` |
| 665 | .intermediates/myjavatests/linux_glibc_common/javac/myjavatests.jar -> java/myjavatests.jar |
| 666 | .intermediates/myjavatests/linux_glibc_common/myjavatests.config -> java/myjavatests-AndroidTest.xml |
| 667 | `), |
| 668 | ) |
| 669 | } |
| 670 | |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 671 | func TestSnapshotWithJavaSystemModules(t *testing.T) { |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 672 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 673 | sdk { |
| 674 | name: "mysdk", |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 675 | java_header_libs: ["exported-system-module"], |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 676 | java_sdk_libs: ["myjavalib"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 677 | java_system_modules: ["my-system-modules"], |
| 678 | } |
| 679 | |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 680 | java_sdk_library { |
| 681 | name: "myjavalib", |
| 682 | apex_available: ["//apex_available:anyapex"], |
| 683 | srcs: ["Test.java"], |
| 684 | sdk_version: "current", |
| 685 | shared_library: false, |
| 686 | public: { |
| 687 | enabled: true, |
| 688 | }, |
| 689 | } |
| 690 | |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 691 | java_system_modules { |
| 692 | name: "my-system-modules", |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 693 | libs: ["system-module", "exported-system-module", "myjavalib.stubs"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | java_library { |
| 697 | name: "system-module", |
| 698 | srcs: ["Test.java"], |
| 699 | sdk_version: "none", |
| 700 | system_modules: "none", |
| 701 | } |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 702 | |
| 703 | java_library { |
| 704 | name: "exported-system-module", |
| 705 | srcs: ["Test.java"], |
| 706 | sdk_version: "none", |
| 707 | system_modules: "none", |
| 708 | } |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 709 | `) |
| 710 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 711 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 712 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 713 | // This is auto-generated. DO NOT EDIT. |
| 714 | |
| 715 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 716 | name: "exported-system-module", |
| 717 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 718 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 719 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 720 | jars: ["java/exported-system-module.jar"], |
| 721 | } |
| 722 | |
| 723 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 724 | name: "mysdk_system-module", |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 725 | prefer: false, |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 726 | visibility: ["//visibility:private"], |
| 727 | apex_available: ["//apex_available:platform"], |
| 728 | jars: ["java/system-module.jar"], |
| 729 | } |
| 730 | |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 731 | java_sdk_library_import { |
| 732 | name: "myjavalib", |
| 733 | prefer: false, |
| 734 | visibility: ["//visibility:public"], |
| 735 | apex_available: ["//apex_available:anyapex"], |
| 736 | shared_library: false, |
| 737 | public: { |
| 738 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
| 739 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
| 740 | current_api: "sdk_library/public/myjavalib.txt", |
| 741 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 742 | sdk_version: "current", |
| 743 | }, |
| 744 | } |
| 745 | |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 746 | java_system_modules_import { |
| 747 | name: "my-system-modules", |
| 748 | prefer: false, |
| 749 | visibility: ["//visibility:public"], |
| 750 | libs: [ |
| 751 | "mysdk_system-module", |
| 752 | "exported-system-module", |
Paul Duffin | b97b157 | 2021-04-29 21:50:40 +0100 | [diff] [blame] | 753 | "myjavalib.stubs", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 754 | ], |
| 755 | } |
| 756 | `), |
| 757 | checkVersionedAndroidBpContents(` |
| 758 | // This is auto-generated. DO NOT EDIT. |
| 759 | |
| 760 | java_import { |
| 761 | name: "mysdk_exported-system-module@current", |
| 762 | sdk_member_name: "exported-system-module", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 763 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 764 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 765 | jars: ["java/exported-system-module.jar"], |
| 766 | } |
| 767 | |
| 768 | java_import { |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 769 | name: "mysdk_system-module@current", |
| 770 | sdk_member_name: "system-module", |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 771 | visibility: ["//visibility:private"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 772 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 773 | jars: ["java/system-module.jar"], |
| 774 | } |
| 775 | |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 776 | java_sdk_library_import { |
| 777 | name: "mysdk_myjavalib@current", |
| 778 | sdk_member_name: "myjavalib", |
| 779 | visibility: ["//visibility:public"], |
| 780 | apex_available: ["//apex_available:anyapex"], |
| 781 | shared_library: false, |
| 782 | public: { |
| 783 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
| 784 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
| 785 | current_api: "sdk_library/public/myjavalib.txt", |
| 786 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 787 | sdk_version: "current", |
| 788 | }, |
| 789 | } |
| 790 | |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 791 | java_system_modules_import { |
| 792 | name: "mysdk_my-system-modules@current", |
| 793 | sdk_member_name: "my-system-modules", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 794 | visibility: ["//visibility:public"], |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 795 | libs: [ |
| 796 | "mysdk_system-module@current", |
| 797 | "mysdk_exported-system-module@current", |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 798 | "mysdk_myjavalib.stubs@current", |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 799 | ], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 800 | } |
| 801 | |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 802 | sdk_snapshot { |
| 803 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 804 | visibility: ["//visibility:public"], |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 805 | java_header_libs: ["mysdk_exported-system-module@current"], |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 806 | java_sdk_libs: ["mysdk_myjavalib@current"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 807 | java_system_modules: ["mysdk_my-system-modules@current"], |
| 808 | } |
| 809 | `), |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 810 | checkAllCopyRules(` |
| 811 | .intermediates/exported-system-module/android_common/turbine-combined/exported-system-module.jar -> java/exported-system-module.jar |
| 812 | .intermediates/system-module/android_common/turbine-combined/system-module.jar -> java/system-module.jar |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 813 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
| 814 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 815 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 816 | `), |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 817 | ) |
| 818 | } |
| 819 | |
| 820 | func TestHostSnapshotWithJavaSystemModules(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 821 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 822 | sdk { |
| 823 | name: "mysdk", |
| 824 | device_supported: false, |
| 825 | host_supported: true, |
| 826 | java_system_modules: ["my-system-modules"], |
| 827 | } |
| 828 | |
| 829 | java_system_modules { |
| 830 | name: "my-system-modules", |
| 831 | device_supported: false, |
| 832 | host_supported: true, |
| 833 | libs: ["system-module"], |
| 834 | } |
| 835 | |
| 836 | java_library { |
| 837 | name: "system-module", |
| 838 | device_supported: false, |
| 839 | host_supported: true, |
| 840 | srcs: ["Test.java"], |
| 841 | sdk_version: "none", |
| 842 | system_modules: "none", |
| 843 | } |
| 844 | `) |
| 845 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 846 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 847 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 848 | // This is auto-generated. DO NOT EDIT. |
| 849 | |
| 850 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 851 | name: "mysdk_system-module", |
| 852 | prefer: false, |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 853 | visibility: ["//visibility:private"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 854 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 855 | device_supported: false, |
| 856 | host_supported: true, |
| 857 | jars: ["java/system-module.jar"], |
| 858 | } |
| 859 | |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 860 | java_system_modules_import { |
| 861 | name: "my-system-modules", |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 862 | prefer: false, |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 863 | visibility: ["//visibility:public"], |
| 864 | device_supported: false, |
| 865 | host_supported: true, |
| 866 | libs: ["mysdk_system-module"], |
| 867 | } |
| 868 | `), |
| 869 | checkVersionedAndroidBpContents(` |
| 870 | // This is auto-generated. DO NOT EDIT. |
| 871 | |
| 872 | java_import { |
| 873 | name: "mysdk_system-module@current", |
| 874 | sdk_member_name: "system-module", |
Paul Duffin | 7291095 | 2020-01-20 18:16:30 +0000 | [diff] [blame] | 875 | visibility: ["//visibility:private"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 876 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 877 | device_supported: false, |
| 878 | host_supported: true, |
| 879 | jars: ["java/system-module.jar"], |
| 880 | } |
| 881 | |
| 882 | java_system_modules_import { |
| 883 | name: "mysdk_my-system-modules@current", |
| 884 | sdk_member_name: "my-system-modules", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 885 | visibility: ["//visibility:public"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 886 | device_supported: false, |
| 887 | host_supported: true, |
| 888 | libs: ["mysdk_system-module@current"], |
| 889 | } |
| 890 | |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 891 | sdk_snapshot { |
| 892 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 893 | visibility: ["//visibility:public"], |
Paul Duffin | 7b81f5e | 2020-01-13 21:03:22 +0000 | [diff] [blame] | 894 | device_supported: false, |
| 895 | host_supported: true, |
| 896 | java_system_modules: ["mysdk_my-system-modules@current"], |
| 897 | } |
| 898 | `), |
| 899 | checkAllCopyRules(".intermediates/system-module/linux_glibc_common/javac/system-module.jar -> java/system-module.jar"), |
| 900 | ) |
| 901 | } |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 902 | |
| 903 | func TestDeviceAndHostSnapshotWithOsSpecificMembers(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 904 | result := android.GroupFixturePreparers(prepareForSdkTestWithJava).RunTestWithBp(t, ` |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 905 | module_exports { |
| 906 | name: "myexports", |
| 907 | host_supported: true, |
| 908 | java_libs: ["myjavalib"], |
| 909 | target: { |
| 910 | android: { |
| 911 | java_header_libs: ["androidjavalib"], |
| 912 | }, |
| 913 | host: { |
| 914 | java_header_libs: ["hostjavalib"], |
| 915 | }, |
| 916 | }, |
| 917 | } |
| 918 | |
| 919 | java_library { |
| 920 | name: "myjavalib", |
| 921 | host_supported: true, |
| 922 | srcs: ["Test.java"], |
| 923 | system_modules: "none", |
| 924 | sdk_version: "none", |
| 925 | } |
| 926 | |
| 927 | java_library { |
| 928 | name: "androidjavalib", |
| 929 | srcs: ["Test.java"], |
| 930 | system_modules: "none", |
| 931 | sdk_version: "none", |
| 932 | } |
| 933 | |
| 934 | java_library_host { |
| 935 | name: "hostjavalib", |
| 936 | srcs: ["Test.java"], |
| 937 | } |
| 938 | `) |
| 939 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 940 | CheckSnapshot(t, result, "myexports", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 941 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 942 | // This is auto-generated. DO NOT EDIT. |
| 943 | |
| 944 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 945 | name: "hostjavalib", |
| 946 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 947 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 948 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 949 | device_supported: false, |
| 950 | host_supported: true, |
| 951 | jars: ["java/hostjavalib.jar"], |
| 952 | } |
| 953 | |
| 954 | java_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 955 | name: "androidjavalib", |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 956 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 957 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 958 | apex_available: ["//apex_available:platform"], |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 959 | jars: ["java/androidjavalib.jar"], |
| 960 | } |
| 961 | |
| 962 | java_import { |
| 963 | name: "myjavalib", |
| 964 | prefer: false, |
| 965 | visibility: ["//visibility:public"], |
| 966 | apex_available: ["//apex_available:platform"], |
| 967 | host_supported: true, |
| 968 | target: { |
| 969 | android: { |
| 970 | jars: ["java/android/myjavalib.jar"], |
| 971 | }, |
| 972 | linux_glibc: { |
| 973 | jars: ["java/linux_glibc/myjavalib.jar"], |
| 974 | }, |
| 975 | }, |
| 976 | } |
| 977 | `), |
| 978 | checkVersionedAndroidBpContents(` |
| 979 | // This is auto-generated. DO NOT EDIT. |
| 980 | |
| 981 | java_import { |
| 982 | name: "myexports_hostjavalib@current", |
| 983 | sdk_member_name: "hostjavalib", |
| 984 | visibility: ["//visibility:public"], |
| 985 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 986 | device_supported: false, |
| 987 | host_supported: true, |
| 988 | jars: ["java/hostjavalib.jar"], |
| 989 | } |
| 990 | |
| 991 | java_import { |
| 992 | name: "myexports_androidjavalib@current", |
| 993 | sdk_member_name: "androidjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 994 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 995 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 996 | jars: ["java/androidjavalib.jar"], |
| 997 | } |
| 998 | |
| 999 | java_import { |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1000 | name: "myexports_myjavalib@current", |
| 1001 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1002 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1003 | apex_available: ["//apex_available:platform"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1004 | host_supported: true, |
| 1005 | target: { |
| 1006 | android: { |
| 1007 | jars: ["java/android/myjavalib.jar"], |
| 1008 | }, |
| 1009 | linux_glibc: { |
| 1010 | jars: ["java/linux_glibc/myjavalib.jar"], |
| 1011 | }, |
| 1012 | }, |
| 1013 | } |
| 1014 | |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1015 | module_exports_snapshot { |
| 1016 | name: "myexports@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1017 | visibility: ["//visibility:public"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1018 | host_supported: true, |
Paul Duffin | 07ef3cb | 2020-03-11 18:17:42 +0000 | [diff] [blame] | 1019 | java_libs: ["myexports_myjavalib@current"], |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1020 | target: { |
| 1021 | android: { |
| 1022 | java_header_libs: ["myexports_androidjavalib@current"], |
| 1023 | }, |
| 1024 | linux_glibc: { |
| 1025 | java_header_libs: ["myexports_hostjavalib@current"], |
| 1026 | }, |
| 1027 | }, |
Paul Duffin | 865171e | 2020-03-02 18:38:15 +0000 | [diff] [blame] | 1028 | } |
| 1029 | `), |
| 1030 | checkAllCopyRules(` |
| 1031 | .intermediates/hostjavalib/linux_glibc_common/javac/hostjavalib.jar -> java/hostjavalib.jar |
| 1032 | .intermediates/androidjavalib/android_common/turbine-combined/androidjavalib.jar -> java/androidjavalib.jar |
| 1033 | .intermediates/myjavalib/android_common/javac/myjavalib.jar -> java/android/myjavalib.jar |
| 1034 | .intermediates/myjavalib/linux_glibc_common/javac/myjavalib.jar -> java/linux_glibc/myjavalib.jar |
| 1035 | `), |
| 1036 | ) |
| 1037 | } |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1038 | |
| 1039 | func TestSnapshotWithJavaSdkLibrary(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1040 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1041 | sdk { |
| 1042 | name: "mysdk", |
| 1043 | java_sdk_libs: ["myjavalib"], |
| 1044 | } |
| 1045 | |
| 1046 | java_sdk_library { |
| 1047 | name: "myjavalib", |
| 1048 | apex_available: ["//apex_available:anyapex"], |
| 1049 | srcs: ["Test.java"], |
| 1050 | sdk_version: "current", |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1051 | shared_library: false, |
Paul Duffin | 4911a89 | 2020-04-29 23:35:13 +0100 | [diff] [blame] | 1052 | stubs_library_visibility: ["//other"], |
| 1053 | stubs_source_visibility: ["//another"], |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 1054 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1055 | } |
| 1056 | `) |
| 1057 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1058 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1059 | checkUnversionedAndroidBpContents(` |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1060 | // This is auto-generated. DO NOT EDIT. |
| 1061 | |
| 1062 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1063 | name: "myjavalib", |
| 1064 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1065 | visibility: ["//visibility:public"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1066 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1067 | shared_library: false, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 1068 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1069 | public: { |
| 1070 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1071 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1072 | current_api: "sdk_library/public/myjavalib.txt", |
| 1073 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1074 | sdk_version: "current", |
| 1075 | }, |
| 1076 | system: { |
| 1077 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1078 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1079 | current_api: "sdk_library/system/myjavalib.txt", |
| 1080 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1081 | sdk_version: "system_current", |
| 1082 | }, |
| 1083 | test: { |
| 1084 | jars: ["sdk_library/test/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1085 | stub_srcs: ["sdk_library/test/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1086 | current_api: "sdk_library/test/myjavalib.txt", |
| 1087 | removed_api: "sdk_library/test/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1088 | sdk_version: "test_current", |
| 1089 | }, |
| 1090 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1091 | `), |
| 1092 | checkVersionedAndroidBpContents(` |
| 1093 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1094 | |
| 1095 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1096 | name: "mysdk_myjavalib@current", |
| 1097 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1098 | visibility: ["//visibility:public"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1099 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1100 | shared_library: false, |
Paul Duffin | 869de14 | 2021-07-15 14:14:41 +0100 | [diff] [blame^] | 1101 | permitted_packages: ["pkg.myjavalib"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1102 | public: { |
| 1103 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1104 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1105 | current_api: "sdk_library/public/myjavalib.txt", |
| 1106 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1107 | sdk_version: "current", |
| 1108 | }, |
| 1109 | system: { |
| 1110 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1111 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1112 | current_api: "sdk_library/system/myjavalib.txt", |
| 1113 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1114 | sdk_version: "system_current", |
| 1115 | }, |
| 1116 | test: { |
| 1117 | jars: ["sdk_library/test/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1118 | stub_srcs: ["sdk_library/test/myjavalib_stub_sources"], |
Paul Duffin | 1fd005d | 2020-04-09 01:08:11 +0100 | [diff] [blame] | 1119 | current_api: "sdk_library/test/myjavalib.txt", |
| 1120 | removed_api: "sdk_library/test/myjavalib-removed.txt", |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1121 | sdk_version: "test_current", |
| 1122 | }, |
| 1123 | } |
| 1124 | |
| 1125 | sdk_snapshot { |
| 1126 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1127 | visibility: ["//visibility:public"], |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1128 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1129 | } |
| 1130 | `), |
| 1131 | checkAllCopyRules(` |
| 1132 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1133 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1134 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1135 | .intermediates/myjavalib.stubs.system/android_common/javac/myjavalib.stubs.system.jar -> sdk_library/system/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1136 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_api.txt -> sdk_library/system/myjavalib.txt |
| 1137 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_removed.txt -> sdk_library/system/myjavalib-removed.txt |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1138 | .intermediates/myjavalib.stubs.test/android_common/javac/myjavalib.stubs.test.jar -> sdk_library/test/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1139 | .intermediates/myjavalib.stubs.source.test/android_common/metalava/myjavalib.stubs.source.test_api.txt -> sdk_library/test/myjavalib.txt |
| 1140 | .intermediates/myjavalib.stubs.source.test/android_common/metalava/myjavalib.stubs.source.test_removed.txt -> sdk_library/test/myjavalib-removed.txt |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1141 | `), |
Paul Duffin | 3d1248c | 2020-04-09 00:10:17 +0100 | [diff] [blame] | 1142 | checkMergeZips( |
| 1143 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1144 | ".intermediates/mysdk/common_os/tmp/sdk_library/system/myjavalib_stub_sources.zip", |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 1145 | ".intermediates/mysdk/common_os/tmp/sdk_library/test/myjavalib_stub_sources.zip", |
| 1146 | ), |
| 1147 | snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) { |
Paul Duffin | b97b157 | 2021-04-29 21:50:40 +0100 | [diff] [blame] | 1148 | // Make sure that the name of the child modules created by a versioned java_sdk_library_import |
| 1149 | // module is correct, i.e. the suffix is added before the version and not after. |
| 1150 | result.Module("mysdk_myjavalib.stubs@current", "android_common") |
| 1151 | result.Module("mysdk_myjavalib.stubs.source@current", "android_common") |
Paul Duffin | 3302871 | 2021-06-22 11:00:07 +0100 | [diff] [blame] | 1152 | }), |
Paul Duffin | dd46f71 | 2020-02-10 13:37:10 +0000 | [diff] [blame] | 1153 | ) |
| 1154 | } |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1155 | |
Paul Duffin | 22628d5 | 2021-05-12 23:13:22 +0100 | [diff] [blame] | 1156 | func TestSnapshotWithJavaSdkLibrary_UseSrcJar(t *testing.T) { |
| 1157 | result := android.GroupFixturePreparers( |
| 1158 | prepareForSdkTestWithJavaSdkLibrary, |
| 1159 | android.FixtureMergeEnv(map[string]string{ |
| 1160 | "SOONG_SDK_SNAPSHOT_USE_SRCJAR": "true", |
| 1161 | }), |
| 1162 | ).RunTestWithBp(t, ` |
| 1163 | sdk { |
| 1164 | name: "mysdk", |
| 1165 | java_sdk_libs: ["myjavalib"], |
| 1166 | } |
| 1167 | |
| 1168 | java_sdk_library { |
| 1169 | name: "myjavalib", |
| 1170 | srcs: ["Test.java"], |
| 1171 | sdk_version: "current", |
| 1172 | shared_library: false, |
| 1173 | public: { |
| 1174 | enabled: true, |
| 1175 | }, |
| 1176 | } |
| 1177 | `) |
| 1178 | |
| 1179 | CheckSnapshot(t, result, "mysdk", "", |
| 1180 | checkUnversionedAndroidBpContents(` |
| 1181 | // This is auto-generated. DO NOT EDIT. |
| 1182 | |
| 1183 | java_sdk_library_import { |
| 1184 | name: "myjavalib", |
| 1185 | prefer: false, |
| 1186 | visibility: ["//visibility:public"], |
| 1187 | apex_available: ["//apex_available:platform"], |
| 1188 | shared_library: false, |
| 1189 | public: { |
| 1190 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
| 1191 | stub_srcs: ["sdk_library/public/myjavalib.srcjar"], |
| 1192 | current_api: "sdk_library/public/myjavalib.txt", |
| 1193 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1194 | sdk_version: "current", |
| 1195 | }, |
| 1196 | } |
| 1197 | `), |
| 1198 | checkAllCopyRules(` |
| 1199 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
| 1200 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source-stubs.srcjar -> sdk_library/public/myjavalib.srcjar |
| 1201 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1202 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
| 1203 | `), |
| 1204 | ) |
| 1205 | } |
| 1206 | |
Paul Duffin | 1267d87 | 2021-04-16 17:21:36 +0100 | [diff] [blame] | 1207 | func TestSnapshotWithJavaSdkLibrary_CompileDex(t *testing.T) { |
| 1208 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
| 1209 | sdk { |
| 1210 | name: "mysdk", |
| 1211 | java_sdk_libs: ["myjavalib"], |
| 1212 | } |
| 1213 | |
| 1214 | java_sdk_library { |
| 1215 | name: "myjavalib", |
| 1216 | srcs: ["Test.java"], |
| 1217 | sdk_version: "current", |
| 1218 | shared_library: false, |
| 1219 | compile_dex: true, |
| 1220 | public: { |
| 1221 | enabled: true, |
| 1222 | }, |
| 1223 | system: { |
| 1224 | enabled: true, |
| 1225 | }, |
| 1226 | } |
| 1227 | `) |
| 1228 | |
| 1229 | CheckSnapshot(t, result, "mysdk", "", |
| 1230 | checkUnversionedAndroidBpContents(` |
| 1231 | // This is auto-generated. DO NOT EDIT. |
| 1232 | |
| 1233 | java_sdk_library_import { |
| 1234 | name: "myjavalib", |
| 1235 | prefer: false, |
| 1236 | visibility: ["//visibility:public"], |
| 1237 | apex_available: ["//apex_available:platform"], |
| 1238 | shared_library: false, |
| 1239 | compile_dex: true, |
| 1240 | public: { |
| 1241 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
| 1242 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
| 1243 | current_api: "sdk_library/public/myjavalib.txt", |
| 1244 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1245 | sdk_version: "current", |
| 1246 | }, |
| 1247 | system: { |
| 1248 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
| 1249 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
| 1250 | current_api: "sdk_library/system/myjavalib.txt", |
| 1251 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
| 1252 | sdk_version: "system_current", |
| 1253 | }, |
| 1254 | } |
| 1255 | `), |
| 1256 | snapshotTestChecker(checkSnapshotWithSourcePreferred, func(t *testing.T, result *android.TestResult) { |
| 1257 | ctx := android.ModuleInstallPathContextForTesting(result.Config) |
| 1258 | dexJarBuildPath := func(name string, kind android.SdkKind) string { |
| 1259 | dep := result.Module(name, "android_common").(java.SdkLibraryDependency) |
| 1260 | path := dep.SdkApiStubDexJar(ctx, kind) |
| 1261 | return path.RelativeToTop().String() |
| 1262 | } |
| 1263 | |
| 1264 | dexJarPath := dexJarBuildPath("myjavalib", android.SdkPublic) |
| 1265 | android.AssertStringEquals(t, "source dex public stubs jar build path", "out/soong/.intermediates/myjavalib.stubs/android_common/dex/myjavalib.stubs.jar", dexJarPath) |
| 1266 | |
| 1267 | dexJarPath = dexJarBuildPath("myjavalib", android.SdkSystem) |
| 1268 | systemDexJar := "out/soong/.intermediates/myjavalib.stubs.system/android_common/dex/myjavalib.stubs.system.jar" |
| 1269 | android.AssertStringEquals(t, "source dex system stubs jar build path", systemDexJar, dexJarPath) |
| 1270 | |
| 1271 | // This should fall back to system as module is not available. |
| 1272 | dexJarPath = dexJarBuildPath("myjavalib", android.SdkModule) |
| 1273 | android.AssertStringEquals(t, "source dex module stubs jar build path", systemDexJar, dexJarPath) |
| 1274 | |
| 1275 | dexJarPath = dexJarBuildPath(android.PrebuiltNameFromSource("myjavalib"), android.SdkPublic) |
| 1276 | android.AssertStringEquals(t, "prebuilt dex public stubs jar build path", "out/soong/.intermediates/snapshot/prebuilt_myjavalib.stubs/android_common/dex/myjavalib.stubs.jar", dexJarPath) |
| 1277 | }), |
| 1278 | ) |
| 1279 | } |
| 1280 | |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1281 | func TestSnapshotWithJavaSdkLibrary_SdkVersion_None(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1282 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1283 | sdk { |
| 1284 | name: "mysdk", |
| 1285 | java_sdk_libs: ["myjavalib"], |
| 1286 | } |
| 1287 | |
| 1288 | java_sdk_library { |
| 1289 | name: "myjavalib", |
| 1290 | srcs: ["Test.java"], |
| 1291 | sdk_version: "none", |
| 1292 | system_modules: "none", |
| 1293 | } |
| 1294 | `) |
| 1295 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1296 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1297 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1298 | // This is auto-generated. DO NOT EDIT. |
| 1299 | |
| 1300 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1301 | name: "myjavalib", |
| 1302 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1303 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1304 | apex_available: ["//apex_available:platform"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1305 | shared_library: true, |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1306 | public: { |
| 1307 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1308 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1309 | current_api: "sdk_library/public/myjavalib.txt", |
| 1310 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1311 | sdk_version: "none", |
| 1312 | }, |
| 1313 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1314 | `), |
| 1315 | checkVersionedAndroidBpContents(` |
| 1316 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1317 | |
| 1318 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1319 | name: "mysdk_myjavalib@current", |
| 1320 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1321 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1322 | apex_available: ["//apex_available:platform"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1323 | shared_library: true, |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1324 | public: { |
| 1325 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1326 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1327 | current_api: "sdk_library/public/myjavalib.txt", |
| 1328 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1329 | sdk_version: "none", |
| 1330 | }, |
| 1331 | } |
| 1332 | |
| 1333 | sdk_snapshot { |
| 1334 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1335 | visibility: ["//visibility:public"], |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1336 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1337 | } |
| 1338 | `), |
| 1339 | checkAllCopyRules(` |
| 1340 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1341 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1342 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 780c5f4 | 2020-05-12 15:52:55 +0100 | [diff] [blame] | 1343 | `), |
| 1344 | checkMergeZips( |
| 1345 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1346 | ), |
| 1347 | ) |
| 1348 | } |
| 1349 | |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1350 | func TestSnapshotWithJavaSdkLibrary_SdkVersion_ForScope(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1351 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1352 | sdk { |
| 1353 | name: "mysdk", |
| 1354 | java_sdk_libs: ["myjavalib"], |
| 1355 | } |
| 1356 | |
| 1357 | java_sdk_library { |
| 1358 | name: "myjavalib", |
| 1359 | srcs: ["Test.java"], |
| 1360 | sdk_version: "module_current", |
| 1361 | public: { |
| 1362 | enabled: true, |
| 1363 | sdk_version: "module_current", |
| 1364 | }, |
| 1365 | } |
| 1366 | `) |
| 1367 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1368 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1369 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1370 | // This is auto-generated. DO NOT EDIT. |
| 1371 | |
| 1372 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1373 | name: "myjavalib", |
| 1374 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1375 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1376 | apex_available: ["//apex_available:platform"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1377 | shared_library: true, |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1378 | public: { |
| 1379 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1380 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1381 | current_api: "sdk_library/public/myjavalib.txt", |
| 1382 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1383 | sdk_version: "module_current", |
| 1384 | }, |
| 1385 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1386 | `), |
| 1387 | checkVersionedAndroidBpContents(` |
| 1388 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1389 | |
| 1390 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1391 | name: "mysdk_myjavalib@current", |
| 1392 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1393 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1394 | apex_available: ["//apex_available:platform"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1395 | shared_library: true, |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1396 | public: { |
| 1397 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1398 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1399 | current_api: "sdk_library/public/myjavalib.txt", |
| 1400 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1401 | sdk_version: "module_current", |
| 1402 | }, |
| 1403 | } |
| 1404 | |
| 1405 | sdk_snapshot { |
| 1406 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1407 | visibility: ["//visibility:public"], |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1408 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1409 | } |
| 1410 | `), |
| 1411 | checkAllCopyRules(` |
| 1412 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1413 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1414 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 87a05a3 | 2020-05-12 11:50:28 +0100 | [diff] [blame] | 1415 | `), |
| 1416 | checkMergeZips( |
| 1417 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1418 | ), |
| 1419 | ) |
| 1420 | } |
| 1421 | |
| 1422 | func TestSnapshotWithJavaSdkLibrary_ApiScopes(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1423 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1424 | sdk { |
| 1425 | name: "mysdk", |
| 1426 | java_sdk_libs: ["myjavalib"], |
| 1427 | } |
| 1428 | |
| 1429 | java_sdk_library { |
| 1430 | name: "myjavalib", |
| 1431 | apex_available: ["//apex_available:anyapex"], |
| 1432 | srcs: ["Test.java"], |
| 1433 | sdk_version: "current", |
| 1434 | public: { |
| 1435 | enabled: true, |
| 1436 | }, |
| 1437 | system: { |
| 1438 | enabled: true, |
| 1439 | }, |
| 1440 | } |
| 1441 | `) |
| 1442 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1443 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1444 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1445 | // This is auto-generated. DO NOT EDIT. |
| 1446 | |
| 1447 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1448 | name: "myjavalib", |
| 1449 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1450 | visibility: ["//visibility:public"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1451 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1452 | shared_library: true, |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1453 | public: { |
| 1454 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1455 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1456 | current_api: "sdk_library/public/myjavalib.txt", |
| 1457 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1458 | sdk_version: "current", |
| 1459 | }, |
| 1460 | system: { |
| 1461 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1462 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1463 | current_api: "sdk_library/system/myjavalib.txt", |
| 1464 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
| 1465 | sdk_version: "system_current", |
| 1466 | }, |
| 1467 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1468 | `), |
| 1469 | checkVersionedAndroidBpContents(` |
| 1470 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1471 | |
| 1472 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1473 | name: "mysdk_myjavalib@current", |
| 1474 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1475 | visibility: ["//visibility:public"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1476 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1477 | shared_library: true, |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1478 | public: { |
| 1479 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1480 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1481 | current_api: "sdk_library/public/myjavalib.txt", |
| 1482 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1483 | sdk_version: "current", |
| 1484 | }, |
| 1485 | system: { |
| 1486 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1487 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1488 | current_api: "sdk_library/system/myjavalib.txt", |
| 1489 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
| 1490 | sdk_version: "system_current", |
| 1491 | }, |
| 1492 | } |
| 1493 | |
| 1494 | sdk_snapshot { |
| 1495 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1496 | visibility: ["//visibility:public"], |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1497 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1498 | } |
| 1499 | `), |
| 1500 | checkAllCopyRules(` |
| 1501 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1502 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1503 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1504 | .intermediates/myjavalib.stubs.system/android_common/javac/myjavalib.stubs.system.jar -> sdk_library/system/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1505 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_api.txt -> sdk_library/system/myjavalib.txt |
| 1506 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_removed.txt -> sdk_library/system/myjavalib-removed.txt |
Paul Duffin | 3375e35 | 2020-04-28 10:44:03 +0100 | [diff] [blame] | 1507 | `), |
| 1508 | checkMergeZips( |
| 1509 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1510 | ".intermediates/mysdk/common_os/tmp/sdk_library/system/myjavalib_stub_sources.zip", |
| 1511 | ), |
| 1512 | ) |
| 1513 | } |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1514 | |
| 1515 | func TestSnapshotWithJavaSdkLibrary_ModuleLib(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1516 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1517 | sdk { |
| 1518 | name: "mysdk", |
| 1519 | java_sdk_libs: ["myjavalib"], |
| 1520 | } |
| 1521 | |
| 1522 | java_sdk_library { |
| 1523 | name: "myjavalib", |
| 1524 | apex_available: ["//apex_available:anyapex"], |
| 1525 | srcs: ["Test.java"], |
| 1526 | sdk_version: "current", |
| 1527 | public: { |
| 1528 | enabled: true, |
| 1529 | }, |
| 1530 | system: { |
| 1531 | enabled: true, |
| 1532 | }, |
| 1533 | module_lib: { |
| 1534 | enabled: true, |
| 1535 | }, |
| 1536 | } |
| 1537 | `) |
| 1538 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1539 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1540 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1541 | // This is auto-generated. DO NOT EDIT. |
| 1542 | |
| 1543 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1544 | name: "myjavalib", |
| 1545 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1546 | visibility: ["//visibility:public"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1547 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1548 | shared_library: true, |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1549 | public: { |
| 1550 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1551 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1552 | current_api: "sdk_library/public/myjavalib.txt", |
| 1553 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1554 | sdk_version: "current", |
| 1555 | }, |
| 1556 | system: { |
| 1557 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1558 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1559 | current_api: "sdk_library/system/myjavalib.txt", |
| 1560 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
| 1561 | sdk_version: "system_current", |
| 1562 | }, |
| 1563 | module_lib: { |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1564 | jars: ["sdk_library/module-lib/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1565 | stub_srcs: ["sdk_library/module-lib/myjavalib_stub_sources"], |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1566 | current_api: "sdk_library/module-lib/myjavalib.txt", |
| 1567 | removed_api: "sdk_library/module-lib/myjavalib-removed.txt", |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1568 | sdk_version: "module_current", |
| 1569 | }, |
| 1570 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1571 | `), |
| 1572 | checkVersionedAndroidBpContents(` |
| 1573 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1574 | |
| 1575 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1576 | name: "mysdk_myjavalib@current", |
| 1577 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1578 | visibility: ["//visibility:public"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1579 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1580 | shared_library: true, |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1581 | public: { |
| 1582 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1583 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1584 | current_api: "sdk_library/public/myjavalib.txt", |
| 1585 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1586 | sdk_version: "current", |
| 1587 | }, |
| 1588 | system: { |
| 1589 | jars: ["sdk_library/system/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1590 | stub_srcs: ["sdk_library/system/myjavalib_stub_sources"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1591 | current_api: "sdk_library/system/myjavalib.txt", |
| 1592 | removed_api: "sdk_library/system/myjavalib-removed.txt", |
| 1593 | sdk_version: "system_current", |
| 1594 | }, |
| 1595 | module_lib: { |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1596 | jars: ["sdk_library/module-lib/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1597 | stub_srcs: ["sdk_library/module-lib/myjavalib_stub_sources"], |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1598 | current_api: "sdk_library/module-lib/myjavalib.txt", |
| 1599 | removed_api: "sdk_library/module-lib/myjavalib-removed.txt", |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1600 | sdk_version: "module_current", |
| 1601 | }, |
| 1602 | } |
| 1603 | |
| 1604 | sdk_snapshot { |
| 1605 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1606 | visibility: ["//visibility:public"], |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1607 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1608 | } |
| 1609 | `), |
| 1610 | checkAllCopyRules(` |
| 1611 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1612 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1613 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1614 | .intermediates/myjavalib.stubs.system/android_common/javac/myjavalib.stubs.system.jar -> sdk_library/system/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1615 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_api.txt -> sdk_library/system/myjavalib.txt |
| 1616 | .intermediates/myjavalib.stubs.source.system/android_common/metalava/myjavalib.stubs.source.system_removed.txt -> sdk_library/system/myjavalib-removed.txt |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1617 | .intermediates/myjavalib.stubs.module_lib/android_common/javac/myjavalib.stubs.module_lib.jar -> sdk_library/module-lib/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1618 | .intermediates/myjavalib.stubs.source.module_lib/android_common/metalava/myjavalib.stubs.source.module_lib_api.txt -> sdk_library/module-lib/myjavalib.txt |
| 1619 | .intermediates/myjavalib.stubs.source.module_lib/android_common/metalava/myjavalib.stubs.source.module_lib_removed.txt -> sdk_library/module-lib/myjavalib-removed.txt |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1620 | `), |
| 1621 | checkMergeZips( |
| 1622 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1623 | ".intermediates/mysdk/common_os/tmp/sdk_library/system/myjavalib_stub_sources.zip", |
Paul Duffin | 6b836ba | 2020-05-13 19:19:49 +0100 | [diff] [blame] | 1624 | ".intermediates/mysdk/common_os/tmp/sdk_library/module-lib/myjavalib_stub_sources.zip", |
Paul Duffin | 8f265b9 | 2020-04-28 14:13:56 +0100 | [diff] [blame] | 1625 | ), |
| 1626 | ) |
| 1627 | } |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1628 | |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1629 | func TestSnapshotWithJavaSdkLibrary_SystemServer(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1630 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1631 | sdk { |
| 1632 | name: "mysdk", |
| 1633 | java_sdk_libs: ["myjavalib"], |
| 1634 | } |
| 1635 | |
| 1636 | java_sdk_library { |
| 1637 | name: "myjavalib", |
| 1638 | apex_available: ["//apex_available:anyapex"], |
| 1639 | srcs: ["Test.java"], |
| 1640 | sdk_version: "current", |
| 1641 | public: { |
| 1642 | enabled: true, |
| 1643 | }, |
| 1644 | system_server: { |
| 1645 | enabled: true, |
| 1646 | }, |
| 1647 | } |
| 1648 | `) |
| 1649 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1650 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1651 | checkUnversionedAndroidBpContents(` |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1652 | // This is auto-generated. DO NOT EDIT. |
| 1653 | |
| 1654 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1655 | name: "myjavalib", |
| 1656 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1657 | visibility: ["//visibility:public"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1658 | apex_available: ["//apex_available:anyapex"], |
| 1659 | shared_library: true, |
| 1660 | public: { |
| 1661 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1662 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1663 | current_api: "sdk_library/public/myjavalib.txt", |
| 1664 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1665 | sdk_version: "current", |
| 1666 | }, |
| 1667 | system_server: { |
| 1668 | jars: ["sdk_library/system-server/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1669 | stub_srcs: ["sdk_library/system-server/myjavalib_stub_sources"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1670 | current_api: "sdk_library/system-server/myjavalib.txt", |
| 1671 | removed_api: "sdk_library/system-server/myjavalib-removed.txt", |
| 1672 | sdk_version: "system_server_current", |
| 1673 | }, |
| 1674 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1675 | `), |
| 1676 | checkVersionedAndroidBpContents(` |
| 1677 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1678 | |
| 1679 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1680 | name: "mysdk_myjavalib@current", |
| 1681 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1682 | visibility: ["//visibility:public"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1683 | apex_available: ["//apex_available:anyapex"], |
| 1684 | shared_library: true, |
| 1685 | public: { |
| 1686 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1687 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1688 | current_api: "sdk_library/public/myjavalib.txt", |
| 1689 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1690 | sdk_version: "current", |
| 1691 | }, |
| 1692 | system_server: { |
| 1693 | jars: ["sdk_library/system-server/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1694 | stub_srcs: ["sdk_library/system-server/myjavalib_stub_sources"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1695 | current_api: "sdk_library/system-server/myjavalib.txt", |
| 1696 | removed_api: "sdk_library/system-server/myjavalib-removed.txt", |
| 1697 | sdk_version: "system_server_current", |
| 1698 | }, |
| 1699 | } |
| 1700 | |
| 1701 | sdk_snapshot { |
| 1702 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1703 | visibility: ["//visibility:public"], |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1704 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1705 | } |
| 1706 | `), |
| 1707 | checkAllCopyRules(` |
| 1708 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1709 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1710 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1711 | .intermediates/myjavalib.stubs.system_server/android_common/javac/myjavalib.stubs.system_server.jar -> sdk_library/system-server/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1712 | .intermediates/myjavalib.stubs.source.system_server/android_common/metalava/myjavalib.stubs.source.system_server_api.txt -> sdk_library/system-server/myjavalib.txt |
| 1713 | .intermediates/myjavalib.stubs.source.system_server/android_common/metalava/myjavalib.stubs.source.system_server_removed.txt -> sdk_library/system-server/myjavalib-removed.txt |
Paul Duffin | 0c5bae5 | 2020-06-02 13:00:08 +0100 | [diff] [blame] | 1714 | `), |
| 1715 | checkMergeZips( |
| 1716 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1717 | ".intermediates/mysdk/common_os/tmp/sdk_library/system-server/myjavalib_stub_sources.zip", |
| 1718 | ), |
| 1719 | ) |
| 1720 | } |
| 1721 | |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1722 | func TestSnapshotWithJavaSdkLibrary_NamingScheme(t *testing.T) { |
Paul Duffin | 9ec86b1 | 2021-03-15 11:17:52 +0000 | [diff] [blame] | 1723 | result := android.GroupFixturePreparers(prepareForSdkTestWithJavaSdkLibrary).RunTestWithBp(t, ` |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1724 | sdk { |
| 1725 | name: "mysdk", |
| 1726 | java_sdk_libs: ["myjavalib"], |
| 1727 | } |
| 1728 | |
| 1729 | java_sdk_library { |
| 1730 | name: "myjavalib", |
| 1731 | apex_available: ["//apex_available:anyapex"], |
| 1732 | srcs: ["Test.java"], |
| 1733 | sdk_version: "current", |
Paul Duffin | ee9ad5d | 2020-09-11 13:04:05 +0100 | [diff] [blame] | 1734 | naming_scheme: "default", |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1735 | public: { |
| 1736 | enabled: true, |
| 1737 | }, |
| 1738 | } |
| 1739 | `) |
| 1740 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1741 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1742 | checkUnversionedAndroidBpContents(` |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1743 | // This is auto-generated. DO NOT EDIT. |
| 1744 | |
| 1745 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1746 | name: "myjavalib", |
| 1747 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1748 | visibility: ["//visibility:public"], |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1749 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | ee9ad5d | 2020-09-11 13:04:05 +0100 | [diff] [blame] | 1750 | naming_scheme: "default", |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1751 | shared_library: true, |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1752 | public: { |
| 1753 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1754 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1755 | current_api: "sdk_library/public/myjavalib.txt", |
| 1756 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1757 | sdk_version: "current", |
| 1758 | }, |
| 1759 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1760 | `), |
| 1761 | checkVersionedAndroidBpContents(` |
| 1762 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1763 | |
| 1764 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1765 | name: "mysdk_myjavalib@current", |
| 1766 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1767 | visibility: ["//visibility:public"], |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1768 | apex_available: ["//apex_available:anyapex"], |
Paul Duffin | ee9ad5d | 2020-09-11 13:04:05 +0100 | [diff] [blame] | 1769 | naming_scheme: "default", |
Paul Duffin | d7eb1c2 | 2020-05-26 20:57:10 +0100 | [diff] [blame] | 1770 | shared_library: true, |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1771 | public: { |
| 1772 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1773 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1774 | current_api: "sdk_library/public/myjavalib.txt", |
| 1775 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1776 | sdk_version: "current", |
| 1777 | }, |
| 1778 | } |
| 1779 | |
| 1780 | sdk_snapshot { |
| 1781 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1782 | visibility: ["//visibility:public"], |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1783 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1784 | } |
| 1785 | `), |
| 1786 | checkAllCopyRules(` |
Paul Duffin | ee9ad5d | 2020-09-11 13:04:05 +0100 | [diff] [blame] | 1787 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1788 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1789 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | f7a6433 | 2020-05-13 16:54:55 +0100 | [diff] [blame] | 1790 | `), |
| 1791 | checkMergeZips( |
| 1792 | ".intermediates/mysdk/common_os/tmp/sdk_library/public/myjavalib_stub_sources.zip", |
| 1793 | ), |
| 1794 | ) |
| 1795 | } |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1796 | |
| 1797 | func TestSnapshotWithJavaSdkLibrary_DoctagFiles(t *testing.T) { |
Paul Duffin | db462dd | 2021-03-21 22:01:55 +0000 | [diff] [blame] | 1798 | result := android.GroupFixturePreparers( |
| 1799 | prepareForSdkTestWithJavaSdkLibrary, |
| 1800 | android.FixtureAddFile("docs/known_doctags", nil), |
| 1801 | ).RunTestWithBp(t, ` |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1802 | sdk { |
| 1803 | name: "mysdk", |
| 1804 | java_sdk_libs: ["myjavalib"], |
| 1805 | } |
| 1806 | |
| 1807 | java_sdk_library { |
| 1808 | name: "myjavalib", |
| 1809 | srcs: ["Test.java"], |
| 1810 | sdk_version: "current", |
| 1811 | public: { |
| 1812 | enabled: true, |
| 1813 | }, |
| 1814 | doctag_files: ["docs/known_doctags"], |
| 1815 | } |
| 1816 | |
| 1817 | filegroup { |
| 1818 | name: "mygroup", |
| 1819 | srcs: [":myjavalib{.doctags}"], |
| 1820 | } |
| 1821 | `) |
| 1822 | |
Paul Duffin | 36474d3 | 2021-03-12 12:19:43 +0000 | [diff] [blame] | 1823 | CheckSnapshot(t, result, "mysdk", "", |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1824 | checkUnversionedAndroidBpContents(` |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1825 | // This is auto-generated. DO NOT EDIT. |
| 1826 | |
| 1827 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1828 | name: "myjavalib", |
| 1829 | prefer: false, |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1830 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1831 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1832 | shared_library: true, |
| 1833 | doctag_files: ["doctags/docs/known_doctags"], |
| 1834 | public: { |
| 1835 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1836 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1837 | current_api: "sdk_library/public/myjavalib.txt", |
| 1838 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1839 | sdk_version: "current", |
| 1840 | }, |
| 1841 | } |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1842 | `), |
| 1843 | checkVersionedAndroidBpContents(` |
| 1844 | // This is auto-generated. DO NOT EDIT. |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1845 | |
| 1846 | java_sdk_library_import { |
Paul Duffin | e138188 | 2021-04-16 17:05:10 +0100 | [diff] [blame] | 1847 | name: "mysdk_myjavalib@current", |
| 1848 | sdk_member_name: "myjavalib", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1849 | visibility: ["//visibility:public"], |
Martin Stjernholm | 1e04109 | 2020-11-03 00:11:09 +0000 | [diff] [blame] | 1850 | apex_available: ["//apex_available:platform"], |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1851 | shared_library: true, |
| 1852 | doctag_files: ["doctags/docs/known_doctags"], |
| 1853 | public: { |
| 1854 | jars: ["sdk_library/public/myjavalib-stubs.jar"], |
Paul Duffin | ab5ac8f | 2020-11-18 16:37:35 +0000 | [diff] [blame] | 1855 | stub_srcs: ["sdk_library/public/myjavalib_stub_sources"], |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1856 | current_api: "sdk_library/public/myjavalib.txt", |
| 1857 | removed_api: "sdk_library/public/myjavalib-removed.txt", |
| 1858 | sdk_version: "current", |
| 1859 | }, |
| 1860 | } |
| 1861 | |
| 1862 | sdk_snapshot { |
| 1863 | name: "mysdk@current", |
Paul Duffin | d99d997 | 2020-09-29 16:00:55 +0100 | [diff] [blame] | 1864 | visibility: ["//visibility:public"], |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1865 | java_sdk_libs: ["mysdk_myjavalib@current"], |
| 1866 | } |
| 1867 | `), |
| 1868 | checkAllCopyRules(` |
| 1869 | .intermediates/myjavalib.stubs/android_common/javac/myjavalib.stubs.jar -> sdk_library/public/myjavalib-stubs.jar |
Colin Cross | cb77f75 | 2021-03-24 12:04:44 -0700 | [diff] [blame] | 1870 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_api.txt -> sdk_library/public/myjavalib.txt |
| 1871 | .intermediates/myjavalib.stubs.source/android_common/metalava/myjavalib.stubs.source_removed.txt -> sdk_library/public/myjavalib-removed.txt |
Paul Duffin | a2ae7e0 | 2020-09-11 11:55:00 +0100 | [diff] [blame] | 1872 | docs/known_doctags -> doctags/docs/known_doctags |
| 1873 | `), |
| 1874 | ) |
| 1875 | } |