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// Library for read-only access to Sat S2 data files. 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20// Library for read-only access to satellite S2 data files. 21java_library { 22 name: "satellite-s2storage-ro", 23 host_supported: true, 24 srcs: [ 25 "src/readonly/java/**/*.java", 26 ], 27 static_libs: [ 28 "s2storage_ro", 29 ], 30} 31 32// Library for read/write access to satellite S2 data files. 33// This can be a java_library_host since it is used by satellite tools, which runs on host. However, 34// it is also used by the unit test S2RangeFileBasedSatelliteLocationLookupTest, which runs on 35// device. Thus, we need to make it a java_library to support the device-side usage, 36// `host_supported: true` to support the host-side usage. 37java_library { 38 name: "satellite-s2storage-rw", 39 host_supported: true, 40 srcs: [ 41 "src/write/java/**/*.java", 42 ], 43 static_libs: [ 44 "satellite-s2storage-ro", 45 "s2storage_rw", 46 ], 47} 48 49// Library for access to satellite S2 utils. 50java_library { 51 name: "satellite-s2storage-testutils", 52 host_supported: true, 53 srcs: [ 54 "src/testutils/java/**/*.java", 55 ], 56 static_libs: [ 57 "junit", 58 "satellite-s2storage-ro", 59 ], 60} 61 62// Tests for the satellite S2 storage code. 63java_test_host { 64 name: "SatelliteS2StorageTests", 65 srcs: ["src/test/java/**/*.java"], 66 static_libs: [ 67 "junit", 68 "mockito", 69 "objenesis", 70 "satellite-s2storage-rw", 71 "satellite-s2storage-testutils", 72 ], 73 test_options: { 74 unit_test: true, 75 }, 76 test_suites: ["general-tests"], 77}