• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "packages_modules_appsearch_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["packages_modules_appsearch_license"],
22}
23
24filegroup {
25    name: "framework-appsearch-sources",
26    srcs: [
27        ":framework-appsearch-internal-sources",
28        ":framework-appsearch-external-sources",
29    ],
30    visibility: [
31        "//frameworks/base",
32        "//packages/modules/AppSearch:__subpackages__"
33    ],
34}
35
36filegroup {
37    name: "framework-appsearch-internal-sources",
38    srcs: [
39        "java/**/*.java",
40        "java/**/*.aidl",
41    ],
42    exclude_srcs: [":framework-appsearch-external-sources"],
43    path: "java",
44}
45
46filegroup {
47    name: "framework-appsearch-external-sources",
48    srcs: [
49        "java/external/**/*.java",
50        "java/external/**/*.aidl",
51    ],
52    path: "java/external",
53}
54
55java_sdk_library {
56    name: "framework-appsearch",
57    srcs: [":framework-appsearch-sources"],
58    sdk_version: "module_current",
59    min_sdk_version: "Tiramisu",
60    libs: ["unsupportedappusage"],
61    static_libs: [
62        // This list must be kept in sync with jarjar.txt
63        "modules-utils-preconditions",
64    ],
65    optimize: {
66      enabled: true,
67      optimize: true,
68      shrink: true,
69      proguard_flags_files: ["proguard.flags"],
70    },
71    defaults: ["framework-module-defaults"],
72    permitted_packages: ["android.app.appsearch"],
73    jarjar_rules: "jarjar-rules.txt",
74    apex_available: ["com.android.appsearch"],
75    impl_library_visibility: [
76        "//cts/tests/appsearch:__subpackages__",
77        "//packages/modules/AppSearch/service:__subpackages__",
78        "//packages/modules/AppSearch/testing:__subpackages__",
79    ],
80}
81