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. |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 18 | java_library { |
| 19 | name: "s2-geometry-library-java", |
| 20 | host_supported: true, |
Neil Fuller | 3ebc0f0 | 2020-09-10 14:33:35 +0100 | [diff] [blame^] | 21 | sdk_version: "30", |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 22 | srcs: ["src/**/*.java"], |
| 23 | static_libs: [ |
| 24 | "guava", |
| 25 | ], |
Neil Fuller | 3ebc0f0 | 2020-09-10 14:33:35 +0100 | [diff] [blame^] | 26 | apex_available: [ |
| 27 | "com.android.geotz", |
| 28 | ], |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | // A bundle of the S2 geometry lib and its tests. |
| 32 | // |
| 33 | // atest --host s2-geometry-library-java-tests |
| 34 | java_test { |
| 35 | name: "s2-geometry-library-java-tests", |
| 36 | host_supported: true, |
| 37 | sdk_version: "current", |
| 38 | srcs: ["tests/**/*.java"], |
| 39 | static_libs: [ |
| 40 | "s2-geometry-library-java", |
| 41 | ], |
| 42 | libs: [ |
| 43 | "junit", |
| 44 | ], |
Neil Fuller | e750d5d | 2020-07-16 19:45:30 +0100 | [diff] [blame] | 45 | test_suites: ["general-tests"], |
Neil Fuller | 7e1dc66 | 2020-07-15 14:08:47 +0100 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | // Device tests: atest S2GeometryLibraryJavaTests |
| 49 | android_test { |
| 50 | name: "S2GeometryLibraryJavaTests", |
| 51 | sdk_version: "current", |
| 52 | manifest: "AndroidManifest.xml", |
| 53 | static_libs: [ |
| 54 | "s2-geometry-library-java-tests", |
| 55 | "androidx.test.rules", |
| 56 | "junit", |
| 57 | ], |
| 58 | } |