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. |
| 22 | java_library { |
| 23 | name: "android.test.base", |
| 24 | |
| 25 | srcs: ["src/**/*.java"], |
| 26 | |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame^] | 27 | // Needs to be consistent with the repackaged version of this make target. |
| 28 | java_version: "1.8", |
| 29 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 30 | no_framework_libs: true, |
| 31 | hostdex: true, |
| 32 | libs: [ |
| 33 | "framework", |
| 34 | ], |
| 35 | |
| 36 | } |
| 37 | |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 38 | // Build the legacy-test library |
| 39 | // ============================= |
| 40 | // This contains the junit.framework and android.test classes that were in |
| 41 | // Android API level 25 excluding those from android.test.runner. |
| 42 | // Also contains the com.android.internal.util.Predicate[s] classes. |
| 43 | java_library { |
| 44 | name: "legacy-test", |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 45 | static_libs: ["android.test.base"], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 46 | |
| 47 | no_framework_libs: true, |
| 48 | libs: [ |
| 49 | "framework", |
| 50 | ], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 51 | } |
| 52 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 53 | // Build the repackaged.android.test.base library |
| 54 | // ============================================== |
Paul Duffin | b36eb54 | 2018-01-15 15:47:47 +0000 | [diff] [blame] | 55 | // This contains repackaged versions of the classes from |
| 56 | // android.test.base. |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 57 | java_library_static { |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 58 | name: "repackaged.android.test.base", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 59 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 60 | static_libs: ["android.test.base"], |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 61 | no_framework_libs: true, |
| 62 | libs: [ |
| 63 | "framework", |
| 64 | ], |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 65 | |
| 66 | jarjar_rules: "jarjar-rules.txt", |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame^] | 67 | // Pin java_version until jarjar is certified to support later versions. http://b/72703434 |
| 68 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 69 | } |
| 70 | |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 71 | // Build the android.test.base-minus-junit library |
| 72 | // =============================================== |
| 73 | // This contains the android.test classes from android.test.base plus |
| 74 | // the com.android.internal.util.Predicate[s] classes. This is only |
| 75 | // intended for inclusion in the android.test.legacy static library and |
| 76 | // must not be used elsewhere. |
| 77 | java_library_static { |
| 78 | name: "android.test.base-minus-junit", |
| 79 | |
| 80 | srcs: [ |
| 81 | "src/android/**/*.java", |
| 82 | "src/com/**/*.java", |
| 83 | ], |
| 84 | |
| 85 | sdk_version: "current", |
| 86 | libs: [ |
| 87 | "junit", |
| 88 | ], |
| 89 | } |