You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
3.2 KiB
113 lines
3.2 KiB
// Copyright (C) 2020 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "service-permission-sources",
|
|
srcs: [
|
|
"java/**/*.java",
|
|
],
|
|
path: "java",
|
|
visibility: ["//visibility:private"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "service-permission-protos",
|
|
srcs: [
|
|
"proto/**/*.proto",
|
|
],
|
|
visibility: ["//frameworks/base"],
|
|
}
|
|
|
|
gensrcs {
|
|
name: "service-permission-javastream-protos",
|
|
depfile: true,
|
|
|
|
tools: [
|
|
"aprotoc",
|
|
"protoc-gen-javastream",
|
|
"soong_zip",
|
|
],
|
|
|
|
cmd: "mkdir -p $(genDir)/$(in) " +
|
|
"&& $(location aprotoc) " +
|
|
" --plugin=$(location protoc-gen-javastream) " +
|
|
" --dependency_out=$(depfile) " +
|
|
" --javastream_out=$(genDir)/$(in) " +
|
|
" -Iexternal/protobuf/src " +
|
|
" -I . " +
|
|
" $(in) " +
|
|
"&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
|
|
|
|
srcs: [
|
|
":service-permission-protos",
|
|
],
|
|
output_extension: "srcjar",
|
|
}
|
|
|
|
java_library {
|
|
name: "service-permission-shared",
|
|
srcs: [":service-permission-shared-srcs"],
|
|
libs: [
|
|
"framework-annotations-lib",
|
|
"framework-permission-s-shared",
|
|
],
|
|
apex_available: [
|
|
"com.android.permission",
|
|
"test_com.android.permission",
|
|
],
|
|
installable: false,
|
|
min_sdk_version: "30",
|
|
sdk_version: "system_server_current",
|
|
}
|
|
|
|
java_sdk_library {
|
|
name: "service-permission",
|
|
defaults: ["framework-system-server-module-defaults"],
|
|
impl_library_visibility: [
|
|
"//frameworks/base/apex/permission/tests",
|
|
"//frameworks/base/services/tests/mockingservicestests",
|
|
"//frameworks/base/services/tests/servicestests",
|
|
"//packages/modules/Permission/tests",
|
|
],
|
|
srcs: [
|
|
":service-permission-sources",
|
|
":service-permission-javastream-protos",
|
|
],
|
|
libs: [
|
|
// TODO(b/177884622): Short term solution to prevent service-permission from seeing hidden
|
|
// APIs in framework-permission, as we don't actually have any dependency in it.
|
|
//"framework-permission",
|
|
"framework-permission-s.impl",
|
|
"androidx.annotation_annotation",
|
|
"framework-permission-s-shared",
|
|
"modules-annotation-minsdk",
|
|
],
|
|
static_libs: [
|
|
"modules-utils-os",
|
|
"service-permission-shared",
|
|
],
|
|
jarjar_rules: ":permission-jarjar-rules",
|
|
min_sdk_version: "30",
|
|
sdk_version: "system_server_current",
|
|
apex_available: [
|
|
"com.android.permission",
|
|
"test_com.android.permission",
|
|
],
|
|
installable: true,
|
|
}
|