1// Copyright (C) 2020 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// A library containing common code within the geolocation dir.
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20// Code intended for host usage only.
21java_library_host {
22    name: "geotz_host_common",
23    srcs: ["host/main/java/**/*.java"],
24}
25
26// Code intended for device or host usage.
27java_library {
28    name: "geotz_common",
29    host_supported: true,
30    srcs: ["src/main/java/**/*.java"],
31    libs: ["androidx.annotation_annotation"],
32    sdk_version: "31",
33    min_sdk_version: "31",
34    apex_available: [
35        "//apex_available:platform",
36        "com.android.geotz",
37    ],
38}
39
40// Device side tests for the geotz_common code.
41android_test {
42    name: "GeotzCommonTests",
43    srcs: ["src/test/java/**/*.java"],
44    manifest: "src/test/AndroidManifest.xml",
45    sdk_version: "31",
46    min_sdk_version: "31",
47    static_libs: [
48        "androidx.test.runner",
49        "geotz_lookup",
50        "junit",
51        "truth",
52    ],
53    test_suites: ["general-tests"],
54}
55