blob: 91d16f28dbc5522640d2adfae56eadcc1e6e8df1 [file] [log] [blame]
Neil Fuller7e1dc662020-07-15 14:08:47 +01001//
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 Fuller3ebc0f02020-09-10 14:33:35 +010017// The Java S2 geometry lib.
Bob Badourdae57452021-03-01 21:36:51 -080018package {
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
24license {
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 Fuller7e1dc662020-07-15 14:08:47 +010035java_library {
36 name: "s2-geometry-library-java",
37 host_supported: true,
Neil Fuller3ebc0f02020-09-10 14:33:35 +010038 sdk_version: "30",
Neil Fuller7e1dc662020-07-15 14:08:47 +010039 srcs: ["src/**/*.java"],
40 static_libs: [
41 "guava",
42 ],
Neil Fuller3ebc0f02020-09-10 14:33:35 +010043 apex_available: [
Neil Fullereab1a332022-05-31 22:51:01 +010044 "//apex_available:platform",
Neil Fuller3ebc0f02020-09-10 14:33:35 +010045 "com.android.geotz",
46 ],
Neil Fuller7e1dc662020-07-15 14:08:47 +010047}
48
49// A bundle of the S2 geometry lib and its tests.
50//
51// atest --host s2-geometry-library-java-tests
52java_test {
53 name: "s2-geometry-library-java-tests",
54 host_supported: true,
55 sdk_version: "current",
56 srcs: ["tests/**/*.java"],
57 static_libs: [
58 "s2-geometry-library-java",
59 ],
60 libs: [
61 "junit",
62 ],
Neil Fullere750d5d2020-07-16 19:45:30 +010063 test_suites: ["general-tests"],
Neil Fuller7e1dc662020-07-15 14:08:47 +010064}
65
66// Device tests: atest S2GeometryLibraryJavaTests
67android_test {
68 name: "S2GeometryLibraryJavaTests",
69 sdk_version: "current",
70 manifest: "AndroidManifest.xml",
71 static_libs: [
72 "s2-geometry-library-java-tests",
73 "androidx.test.rules",
74 "junit",
75 ],
76}