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 | |
Bob Badour | e615c58 | 2021-02-12 18:40:16 -0800 | [diff] [blame] | 20 | package { |
| 21 | default_applicable_licenses: ["external_junit-params_license"], |
| 22 | } |
| 23 | |
| 24 | // Added automatically by a large-scale-change |
| 25 | // See: http://go/android-license-faq |
| 26 | license { |
| 27 | name: "external_junit-params_license", |
| 28 | visibility: [":__subpackages__"], |
| 29 | license_kinds: [ |
| 30 | "SPDX-license-identifier-Apache-2.0", |
| 31 | ], |
| 32 | license_text: [ |
| 33 | "LICENSE.txt", |
| 34 | ], |
| 35 | } |
| 36 | |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 37 | java_library { |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 38 | name: "junit-params", |
| 39 | host_supported: true, |
| 40 | hostdex: true, |
| 41 | srcs: ["src/main/java/**/*.java"], |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 42 | sdk_version: "core_current", |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 43 | static_libs: ["junit"], |
| 44 | } |
| 45 | |
| 46 | // compatibility host library with old name |
| 47 | java_library_host { |
| 48 | name: "junit-params-host", |
| 49 | static_libs: ["junit-params"], |
| 50 | } |
| 51 | |
| 52 | //------------------------------- |
| 53 | // build test jars |
| 54 | // |
| 55 | // Run the target test jar as follows: |
| 56 | // vogar --classpath \ |
| 57 | // ${ANDROID_PRODUCT_OUT}/obj/JAVA_LIBRARIES/junit-params-test_intermediates/javalib.jar \ |
| 58 | // junitparams |
| 59 | |
| 60 | java_test { |
| 61 | name: "junit-params-test", |
| 62 | host_supported: true, |
Julien Desprez | 5eb6329 | 2021-02-24 09:26:04 -0800 | [diff] [blame] | 63 | // Don't consider those unit tests, they would be hard to maintain since they are |
| 64 | // from external, and have dependencies on the junit version. |
| 65 | test_options: { |
| 66 | unit_test: false, |
| 67 | }, |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 68 | srcs: ["src/test/java/**/*.java"], |
| 69 | java_resource_dirs: ["src/test/resources"], |
Neil Fuller | f78c781 | 2018-09-25 13:24:22 +0100 | [diff] [blame] | 70 | sdk_version: "core_current", |
Colin Cross | 98cf2d7 | 2018-04-09 18:31:24 -0700 | [diff] [blame] | 71 | static_libs: [ |
| 72 | "junit-params", |
| 73 | "junit-params-assertj-core", |
| 74 | ], |
| 75 | } |
| 76 | |
| 77 | //------------------------------- |
| 78 | // prebuilt dependencies |
| 79 | |
| 80 | java_import { |
| 81 | name: "junit-params-assertj-core", |
| 82 | jars: ["lib/assertj-core-1.7.1.jar"], |
| 83 | host_supported: true, |
| 84 | } |