Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2008 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | // Build the android.test.runner library |
| 18 | // ===================================== |
Bob Badour | 051ef78 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 19 | package { |
| 20 | // See: http://go/android-license-faq |
Colin Cross | c1309ec | 2022-01-10 21:16:59 -0800 | [diff] [blame] | 21 | default_applicable_licenses: ["frameworks_base_test-runner_license"], |
| 22 | } |
| 23 | |
| 24 | license { |
| 25 | name: "frameworks_base_test-runner_license", |
| 26 | visibility: [":__subpackages__"], |
| 27 | license_kinds: [ |
| 28 | "SPDX-license-identifier-Apache-2.0", |
| 29 | "SPDX-license-identifier-CPL-1.0", |
| 30 | ], |
| 31 | license_text: [ |
| 32 | "src/junit/cpl-v10.html", |
| 33 | ], |
Bob Badour | 051ef78 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 34 | } |
| 35 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 36 | java_sdk_library { |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 37 | name: "android.test.runner", |
| 38 | |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 39 | srcs: [":android-test-runner-sources"], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 40 | |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 41 | errorprone: { |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 42 | javacflags: ["-Xep:DepAnn:ERROR"], |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 43 | }, |
| 44 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 45 | libs: [ |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 46 | "android.test.base", |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 47 | "android.test.mock", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 48 | ], |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 49 | stub_only_libs: [ |
| 50 | "android.test.base", |
| 51 | "android.test.mock", |
| 52 | ], |
| 53 | api_packages: [ |
| 54 | "android.test", |
| 55 | "android.test.suitebuilder", |
| 56 | "junit.runner", |
| 57 | "junit.textui", |
| 58 | ], |
| 59 | |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 60 | compile_dex: true, |
Jiyong Park | 912db8d | 2020-05-29 10:51:18 +0900 | [diff] [blame] | 61 | default_to_stubs: true, |
Colin Cross | 5959ec0 | 2021-05-10 10:38:53 -0700 | [diff] [blame] | 62 | dist_group: "android", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 63 | } |
| 64 | |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 65 | // Build the android.test.runner-minus-junit library |
| 66 | // ================================================= |
Paul Duffin | 79d7ba2 | 2019-02-25 19:18:37 +0000 | [diff] [blame] | 67 | // This is only intended for inclusion in the android.test.legacy static |
Paul Duffin | 001d87c | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 68 | // library and must not be used elsewhere. |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 69 | java_library { |
| 70 | name: "android.test.runner-minus-junit", |
| 71 | |
| 72 | srcs: ["src/android/**/*.java"], |
| 73 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 74 | sdk_version: "current", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 75 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 76 | "android.test.base_static", |
| 77 | "android.test.mock", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 78 | "junit", |
| 79 | ], |
| 80 | } |
| 81 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 82 | // Build the repackaged.android.test.runner library |
| 83 | // ================================================ |
| 84 | java_library_static { |
| 85 | name: "repackaged.android.test.runner", |
| 86 | |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 87 | srcs: [":android-test-runner-sources"], |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 88 | exclude_srcs: [ |
| 89 | "src/android/test/ActivityUnitTestCase.java", |
| 90 | "src/android/test/ApplicationTestCase.java", |
| 91 | "src/android/test/IsolatedContext.java", |
| 92 | "src/android/test/ProviderTestCase.java", |
| 93 | "src/android/test/ProviderTestCase2.java", |
| 94 | "src/android/test/RenamingDelegatingContext.java", |
| 95 | "src/android/test/ServiceTestCase.java", |
| 96 | ], |
| 97 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 98 | sdk_version: "current", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 99 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 100 | "android.test.base_static", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 101 | ], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 102 | |
| 103 | jarjar_rules: "jarjar-rules.txt", |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 104 | // Pin java_version until jarjar is certified to support later versions. http://b/72703434 |
| 105 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 106 | } |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 107 | |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 108 | // Make the current.txt available for use by the cts/tests/signature tests. |
| 109 | // ======================================================================== |
| 110 | filegroup { |
| 111 | name: "android-test-runner-current.txt", |
| 112 | visibility: [ |
| 113 | "//cts/tests/signature/api", |
| 114 | ], |
| 115 | srcs: [ |
| 116 | "api/current.txt", |
| 117 | ], |
| 118 | } |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 119 | |
| 120 | filegroup { |
| 121 | name: "android-test-runner-sources", |
| 122 | srcs: ["src/**/*.java"], |
| 123 | path: "src", |
| 124 | } |