Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | // |
| 15 | // |
| 16 | |
| 17 | //------------------------------- |
| 18 | // build a target jar |
| 19 | |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 20 | java_library { |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 21 | name: "junit-params", |
| 22 | host_supported: true, |
| 23 | hostdex: true, |
| 24 | srcs: ["src/main/java/**/*.java"], |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 25 | sdk_version: "core_current", |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 26 | static_libs: ["junit"], |
| 27 | } |
| 28 | |
| 29 | // compatibility host library with old name |
| 30 | java_library_host { |
| 31 | name: "junit-params-host", |
| 32 | static_libs: ["junit-params"], |
| 33 | } |
| 34 | |
| 35 | //------------------------------- |
| 36 | // build test jars |
| 37 | // |
| 38 | // Run the target test jar as follows: |
| 39 | // vogar --classpath \ |
| 40 | // ${ANDROID_PRODUCT_OUT}/obj/JAVA_LIBRARIES/junit-params-test_intermediates/javalib.jar \ |
| 41 | // junitparams |
| 42 | |
| 43 | java_test { |
| 44 | name: "junit-params-test", |
| 45 | host_supported: true, |
| 46 | srcs: ["src/test/java/**/*.java"], |
| 47 | java_resource_dirs: ["src/test/resources"], |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 48 | sdk_version: "core_current", |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 49 | static_libs: [ |
| 50 | "junit-params", |
| 51 | "junit-params-assertj-core", |
| 52 | ], |
| 53 | } |
| 54 | |
| 55 | //------------------------------- |
| 56 | // prebuilt dependencies |
| 57 | |
| 58 | java_import { |
| 59 | name: "junit-params-assertj-core", |
| 60 | jars: ["lib/assertj-core-1.7.1.jar"], |
| 61 | host_supported: true, |
| 62 | } |
| 63 | |