Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2016 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 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 17 | // Build the android.test.base library |
| 18 | // =================================== |
| 19 | // This contains the junit.framework and android.test classes that were in |
| 20 | // Android API level 25 excluding those from android.test.runner. |
| 21 | // Also contains the com.android.internal.util.Predicate[s] classes. |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 22 | java_sdk_library { |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 23 | name: "android.test.base", |
| 24 | |
| 25 | srcs: ["src/**/*.java"], |
| 26 | |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 27 | errorprone: { |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 28 | javacflags: ["-Xep:DepAnn:ERROR"], |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 29 | }, |
| 30 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 31 | hostdex: true, |
| 32 | |
| 33 | api_packages: [ |
| 34 | "android.test", |
| 35 | "android.test.suitebuilder.annotation", |
| 36 | "com.android.internal.util", |
| 37 | "junit.framework", |
| 38 | ], |
| 39 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 40 | compile_dex: true, |
Jiyong Park | c357d96 | 2020-05-29 10:51:18 +0900 | [diff] [blame] | 41 | default_to_stubs: true, |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | // Build the android.test.base_static library |
| 45 | // ========================================== |
| 46 | // This is only intended for inclusion in the android.test.runner-minus-junit, |
| 47 | // robolectric_android-all-stub and repackaged.android.test.* libraries. |
Paul Duffin | 79d7ba2 | 2019-02-25 19:18:37 +0000 | [diff] [blame] | 48 | // Must not be used elsewhere. |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 49 | java_library_static { |
| 50 | name: "android.test.base_static", |
| 51 | installable: false, |
| 52 | |
| 53 | srcs: ["src/**/*.java"], |
| 54 | |
| 55 | errorprone: { |
| 56 | javacflags: ["-Xep:DepAnn:ERROR"], |
| 57 | }, |
| 58 | |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 59 | // Needs to be consistent with the repackaged version of this make target. |
| 60 | java_version: "1.8", |
| 61 | |
Paul Duffin | 4cdec67 | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 62 | sdk_version: "current", |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 63 | } |
| 64 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 65 | // Build the repackaged.android.test.base library |
| 66 | // ============================================== |
Paul Duffin | b36eb54 | 2018-01-15 15:47:47 +0000 | [diff] [blame] | 67 | // This contains repackaged versions of the classes from |
| 68 | // android.test.base. |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 69 | java_library_static { |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 70 | name: "repackaged.android.test.base", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 71 | |
Paul Duffin | 4cdec67 | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 72 | sdk_version: "current", |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 73 | static_libs: ["android.test.base_static"], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 74 | |
| 75 | jarjar_rules: "jarjar-rules.txt", |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 76 | // Pin java_version until jarjar is certified to support later versions. http://b/72703434 |
| 77 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 78 | } |
| 79 | |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 80 | // Build the android.test.base-minus-junit library |
| 81 | // =============================================== |
| 82 | // This contains the android.test classes from android.test.base plus |
| 83 | // the com.android.internal.util.Predicate[s] classes. This is only |
Paul Duffin | 79d7ba2 | 2019-02-25 19:18:37 +0000 | [diff] [blame] | 84 | // intended for inclusion in android.test.legacy and must not be used |
| 85 | // elsewhere. |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 86 | java_library_static { |
| 87 | name: "android.test.base-minus-junit", |
| 88 | |
| 89 | srcs: [ |
| 90 | "src/android/**/*.java", |
| 91 | "src/com/**/*.java", |
| 92 | ], |
| 93 | |
| 94 | sdk_version: "current", |
| 95 | libs: [ |
| 96 | "junit", |
| 97 | ], |
| 98 | } |
Nan Zhang | 3fece48 | 2018-04-13 14:48:32 -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-base-current.txt", |
| 104 | visibility: [ |
| 105 | "//cts/tests/signature/api", |
| 106 | ], |
| 107 | srcs: [ |
| 108 | "api/current.txt", |
| 109 | ], |
| 110 | } |