// Copyright (C) 2019 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.

mainline_stubs_args =
    "--error UnhiddenSystemApi " +
    "--hide BroadcastBehavior " +
    "--hide DeprecationMismatch " +
    "--hide HiddenSuperclass " +
    "--hide HiddenTypedefConstant " +
    "--hide HiddenTypeParameter " +
    "--hide MissingPermission " +
    "--hide RequiresPermission " +
    "--hide SdkConstant " +
    "--hide Todo " +
    "--hide Typo " +
    "--hide UnavailableSymbol "

// TODO: modularize this so not every module has the same whitelist
framework_packages_to_document = [
    "android",
    "dalvik",
    "java",
    "javax",
    "junit",
    "org.apache.http",
    "org.json",
    "org.w3c.dom",
    "org.xml.sax",
    "org.xmlpull",
]

// TODO: remove the hiding when server classes are cleaned up.
mainline_framework_stubs_args =
    mainline_stubs_args +
    "--hide-package com.android.server "

priv_apps = " " +
    "--show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
    "\\) "

module_libs = " " +
    " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
    "\\) "

mainline_service_stubs_args =
    mainline_stubs_args +
    "--show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.SYSTEM_SERVER" +
    "\\) " +
    "--hide-annotation android.annotation.Hide " +
    "--hide InternalClasses " // com.android.* classes are okay in this interface

stubs_defaults {
    name: "framework-module-stubs-defaults-publicapi",
    args: mainline_framework_stubs_args,
    installable: false,
    sdk_version: "module_current",
    filter_packages: framework_packages_to_document,
    check_api: {
        current: {
            api_file: "api/current.txt",
            removed_api_file: "api/removed.txt",
        },
    },
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/public/api",
    },
}

stubs_defaults {
    name: "framework-module-stubs-defaults-systemapi",
    args: mainline_framework_stubs_args + priv_apps,
    libs: ["framework-annotations-lib"],
    installable: false,
    sdk_version: "module_current",
    filter_packages: framework_packages_to_document,
    check_api: {
        current: {
            api_file: "api/system-current.txt",
            removed_api_file: "api/system-removed.txt",
        },
    },
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/system/api",
    },
}

java_defaults {
    name: "framework-module-stubs-lib-defaults-publicapi",
    installable: false,
    sdk_version: "module_current",
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/public",
    },
}

java_defaults {
    name: "framework-module-stubs-lib-defaults-systemapi",
    installable: false,
    sdk_version: "module_current",
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/system",
    },
}

java_defaults {
    name: "framework-module-stubs-lib-defaults-module_libs_api",
    installable: false,
    sdk_version: "module_current",
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/module-lib",
    },
}

// The defaults for module_libs comes in two parts - defaults for API checks
// and defaults for stub generation. This is because we want the API txt
// files to *only* include the module_libs_api, but the stubs to include
// module_libs_api as well as priv_apps.

stubs_defaults {
    name: "framework-module-api-defaults-module_libs_api",
    args: mainline_framework_stubs_args + module_libs,
    libs: ["framework-annotations-lib"],
    installable: false,
    sdk_version: "module_current",
    filter_packages: framework_packages_to_document,
    check_api: {
        current: {
            api_file: "api/module-lib-current.txt",
            removed_api_file: "api/module-lib-removed.txt",
        },
    },
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/module-lib/api",
    },
}

stubs_defaults {
    name: "framework-module-stubs-defaults-module_libs_api",
    args: mainline_framework_stubs_args + module_libs + priv_apps,
    libs: ["framework-annotations-lib"],
    installable: false,
    sdk_version: "module_current",
    filter_packages: framework_packages_to_document,
}

stubs_defaults {
    name: "service-module-stubs-srcs-defaults",
    args: mainline_service_stubs_args,
    installable: false,
    filter_packages: ["com.android."],
    check_api: {
        current: {
            api_file: "api/current.txt",
            removed_api_file: "api/removed.txt",
        },
    },
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/system-server/api",
    },
}

// Empty for now, but a convenient place to add rules for all
// module java_library system_server stub libs.
java_defaults {
    name: "service-module-stubs-defaults",
    dist: {
        targets: ["sdk", "win_sdk"],
        dir: "apistubs/android/system-server",
    },
}
