Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2020 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 | |
Neil Fuller | 3ebc0f0 | 2020-09-10 14:33:35 +0100 | [diff] [blame] | 17 | // The Java S2 geometry lib. |
Bob Badour | dae5745 | 2021-03-01 21:36:51 -0800 | [diff] [blame] | 18 | package { |
| 19 | default_applicable_licenses: ["external_s2-geometry-library-java_license"], |
| 20 | } |
| 21 | |
| 22 | // Added automatically by a large-scale-change |
| 23 | // See: http://go/android-license-faq |
| 24 | license { |
| 25 | name: "external_s2-geometry-library-java_license", |
| 26 | visibility: [":__subpackages__"], |
| 27 | license_kinds: [ |
| 28 | "SPDX-license-identifier-Apache-2.0", |
| 29 | ], |
| 30 | license_text: [ |
| 31 | "LICENSE", |
| 32 | ], |
| 33 | } |
| 34 | |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 35 | java_library { |
| 36 | name: "s2-geometry-library-java", |
| 37 | host_supported: true, |
Neil Fuller | 3ebc0f0 | 2020-09-10 14:33:35 +0100 | [diff] [blame] | 38 | sdk_version: "30", |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 39 | srcs: ["src/**/*.java"], |
| 40 | static_libs: [ |
| 41 | "guava", |
| 42 | ], |
Neil Fuller | 3ebc0f0 | 2020-09-10 14:33:35 +0100 | [diff] [blame] | 43 | apex_available: [ |
| 44 | "com.android.geotz", |
| 45 | ], |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | // A bundle of the S2 geometry lib and its tests. |
| 49 | // |
| 50 | // atest --host s2-geometry-library-java-tests |
| 51 | java_test { |
| 52 | name: "s2-geometry-library-java-tests", |
| 53 | host_supported: true, |
| 54 | sdk_version: "current", |
| 55 | srcs: ["tests/**/*.java"], |
| 56 | static_libs: [ |
| 57 | "s2-geometry-library-java", |
| 58 | ], |
| 59 | libs: [ |
| 60 | "junit", |
| 61 | ], |
Neil Fuller | e750d5d | 2020-07-16 19:45:30 +0100 | [diff] [blame] | 62 | test_suites: ["general-tests"], |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | // Device tests: atest S2GeometryLibraryJavaTests |
| 66 | android_test { |
| 67 | name: "S2GeometryLibraryJavaTests", |
| 68 | sdk_version: "current", |
| 69 | manifest: "AndroidManifest.xml", |
| 70 | static_libs: [ |
| 71 | "s2-geometry-library-java-tests", |
| 72 | "androidx.test.rules", |
| 73 | "junit", |
| 74 | ], |
| 75 | } |