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 |
| 21 | // A large-scale-change added 'default_applicable_licenses' to import |
| 22 | // all of the 'license_kinds' from "frameworks_base_license" |
| 23 | // to get the below license kinds: |
| 24 | // SPDX-license-identifier-Apache-2.0 |
| 25 | // SPDX-license-identifier-CPL-1.0 |
| 26 | default_applicable_licenses: ["frameworks_base_license"], |
| 27 | } |
| 28 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 29 | java_sdk_library { |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 30 | name: "android.test.runner", |
| 31 | |
| 32 | srcs: ["src/**/*.java"], |
| 33 | |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 34 | errorprone: { |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 35 | javacflags: ["-Xep:DepAnn:ERROR"], |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 36 | }, |
| 37 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 38 | libs: [ |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 39 | "android.test.base", |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 40 | "android.test.mock", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 41 | ], |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 42 | stub_only_libs: [ |
| 43 | "android.test.base", |
| 44 | "android.test.mock", |
| 45 | ], |
| 46 | api_packages: [ |
| 47 | "android.test", |
| 48 | "android.test.suitebuilder", |
| 49 | "junit.runner", |
| 50 | "junit.textui", |
| 51 | ], |
| 52 | |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 53 | compile_dex: true, |
Jiyong Park | 912db8d | 2020-05-29 10:51:18 +0900 | [diff] [blame] | 54 | default_to_stubs: true, |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 55 | } |
| 56 | |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 57 | // Build the android.test.runner-minus-junit library |
| 58 | // ================================================= |
Paul Duffin | 79d7ba2 | 2019-02-25 19:18:37 +0000 | [diff] [blame] | 59 | // This is only intended for inclusion in the android.test.legacy static |
Paul Duffin | 001d87c | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 60 | // library and must not be used elsewhere. |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 61 | java_library { |
| 62 | name: "android.test.runner-minus-junit", |
| 63 | |
| 64 | srcs: ["src/android/**/*.java"], |
| 65 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 66 | sdk_version: "current", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 67 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 68 | "android.test.base_static", |
| 69 | "android.test.mock", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 70 | "junit", |
| 71 | ], |
| 72 | } |
| 73 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 74 | // Build the repackaged.android.test.runner library |
| 75 | // ================================================ |
| 76 | java_library_static { |
| 77 | name: "repackaged.android.test.runner", |
| 78 | |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 79 | srcs: ["src/**/*.java"], |
| 80 | exclude_srcs: [ |
| 81 | "src/android/test/ActivityUnitTestCase.java", |
| 82 | "src/android/test/ApplicationTestCase.java", |
| 83 | "src/android/test/IsolatedContext.java", |
| 84 | "src/android/test/ProviderTestCase.java", |
| 85 | "src/android/test/ProviderTestCase2.java", |
| 86 | "src/android/test/RenamingDelegatingContext.java", |
| 87 | "src/android/test/ServiceTestCase.java", |
| 88 | ], |
| 89 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 90 | sdk_version: "current", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 91 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 92 | "android.test.base_static", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 93 | ], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 94 | |
| 95 | jarjar_rules: "jarjar-rules.txt", |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 96 | // Pin java_version until jarjar is certified to support later versions. http://b/72703434 |
| 97 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 98 | } |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 99 | |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 100 | // Make the current.txt available for use by the cts/tests/signature tests. |
| 101 | // ======================================================================== |
| 102 | filegroup { |
| 103 | name: "android-test-runner-current.txt", |
| 104 | visibility: [ |
| 105 | "//cts/tests/signature/api", |
| 106 | ], |
| 107 | srcs: [ |
| 108 | "api/current.txt", |
| 109 | ], |
| 110 | } |