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 | // ===================================== |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 19 | java_sdk_library { |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 20 | name: "android.test.runner", |
| 21 | |
| 22 | srcs: ["src/**/*.java"], |
| 23 | |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 24 | errorprone: { |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 25 | javacflags: ["-Xep:DepAnn:ERROR"], |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 26 | }, |
| 27 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 28 | libs: [ |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 29 | "android.test.base", |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 30 | "android.test.mock", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 31 | ], |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 32 | stub_only_libs: [ |
| 33 | "android.test.base", |
| 34 | "android.test.mock", |
| 35 | ], |
| 36 | api_packages: [ |
| 37 | "android.test", |
| 38 | "android.test.suitebuilder", |
| 39 | "junit.runner", |
| 40 | "junit.textui", |
| 41 | ], |
| 42 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 43 | compile_dex: true |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 44 | } |
| 45 | |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 46 | // Build the android.test.runner-minus-junit library |
| 47 | // ================================================= |
Jakub Gielzak | 7d7af10 | 2019-02-18 18:24:17 +0000 | [diff] [blame^] | 48 | // This is only intended for inclusion in the legacy-android-test static |
Paul Duffin | 001d87c | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 49 | // library and must not be used elsewhere. |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 50 | java_library { |
| 51 | name: "android.test.runner-minus-junit", |
| 52 | |
| 53 | srcs: ["src/android/**/*.java"], |
| 54 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 55 | sdk_version: "current", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 56 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 57 | "android.test.base_static", |
| 58 | "android.test.mock", |
Paul Duffin | a88eb29 | 2018-01-12 16:08:35 +0000 | [diff] [blame] | 59 | "junit", |
| 60 | ], |
| 61 | } |
| 62 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 63 | // Build the repackaged.android.test.runner library |
| 64 | // ================================================ |
| 65 | java_library_static { |
| 66 | name: "repackaged.android.test.runner", |
| 67 | |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 68 | srcs: ["src/**/*.java"], |
| 69 | exclude_srcs: [ |
| 70 | "src/android/test/ActivityUnitTestCase.java", |
| 71 | "src/android/test/ApplicationTestCase.java", |
| 72 | "src/android/test/IsolatedContext.java", |
| 73 | "src/android/test/ProviderTestCase.java", |
| 74 | "src/android/test/ProviderTestCase2.java", |
| 75 | "src/android/test/RenamingDelegatingContext.java", |
| 76 | "src/android/test/ServiceTestCase.java", |
| 77 | ], |
| 78 | |
Jiyong Park | 029925a | 2018-02-22 14:16:35 +0900 | [diff] [blame] | 79 | sdk_version: "current", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 80 | libs: [ |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 81 | "android.test.base_static", |
Paul Duffin | bedfae9 | 2018-02-22 12:16:31 +0000 | [diff] [blame] | 82 | ], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 83 | |
| 84 | jarjar_rules: "jarjar-rules.txt", |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 85 | // Pin java_version until jarjar is certified to support later versions. http://b/72703434 |
| 86 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 87 | } |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 88 | |