// 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_visibility: ["//visibility:private"],
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    //   SPDX-license-identifier-MIT
    //   SPDX-license-identifier-Unicode-DFS
    default_applicable_licenses: ["frameworks_base_license"],
}

bootstrap_go_package {
    name: "soong-api",
    pkgPath: "android/soong/api",
    deps: [
        "blueprint",
        "soong",
        "soong-android",
        "soong-genrule",
        "soong-java",
    ],
    srcs: ["api.go"],
    pluginFor: ["soong_build"],
}

python_binary_host {
    name: "api_versions_trimmer",
    srcs: ["api_versions_trimmer.py"],
}

python_test_host {
    name: "api_versions_trimmer_unittests",
    main: "api_versions_trimmer_unittests.py",
    srcs: [
        "api_versions_trimmer_unittests.py",
        "api_versions_trimmer.py",
    ],
    test_options: {
        unit_test: true,
    },
}

python_binary_host {
    name: "merge_annotation_zips",
    srcs: ["merge_annotation_zips.py"],
}

python_test_host {
    name: "merge_annotation_zips_test",
    main: "merge_annotation_zips_test.py",
    srcs: [
        "merge_annotation_zips.py",
        "merge_annotation_zips_test.py",
    ],
    test_options: {
        unit_test: true,
    },
}

metalava_cmd = "$(location metalava)"
// Silence reflection warnings. See b/168689341
metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED "
metalava_cmd += " --quiet --no-banner --format=v2 "

genrule {
    name: "current-api-xml",
    tools: ["metalava"],
    srcs: [":frameworks-base-api-current.txt"],
    out: ["current.api"],
    cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)",
    visibility: ["//visibility:public"],
}

combined_apis {
    name: "frameworks-base-api",
    bootclasspath: [
        "android.net.ipsec.ike",
        "art.module.public.api",
        "conscrypt.module.public.api",
        "framework-adservices",
        "framework-appsearch",
        "framework-bluetooth",
        "framework-configinfrastructure",
        "framework-connectivity",
        "framework-connectivity-t",
        "framework-devicelock",
        "framework-graphics",
        "framework-healthconnect",
        "framework-media",
        "framework-mediaprovider",
        "framework-ondevicepersonalization",
        "framework-permission",
        "framework-permission-s",
        "framework-scheduling",
        "framework-sdkextensions",
        "framework-statsd",
        "framework-sdksandbox",
        "framework-tethering",
        "framework-uwb",
        "framework-virtualization",
        "framework-wifi",
        "i18n.module.public.api",
    ],
    system_server_classpath: [
        "service-art",
        "service-configinfrastructure",
        "service-healthconnect",
        "service-media-s",
        "service-permission",
        "service-rkp",
        "service-sdksandbox",
    ],
}

genrule {
    name: "frameworks-base-api-current-compat",
    srcs: [
        ":android.api.public.latest",
        ":android-incompatibilities.api.public.latest",
        ":frameworks-base-api-current.txt",
    ],
    out: ["updated-baseline.txt"],
    tools: ["metalava"],
    cmd: metalava_cmd +
        "--check-compatibility:api:released $(location :android.api.public.latest) " +
        "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " +
        "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
        "$(location :frameworks-base-api-current.txt)",
}

genrule {
    name: "frameworks-base-api-system-current-compat",
    srcs: [
        ":android.api.system.latest",
        ":android-incompatibilities.api.system.latest",
        ":frameworks-base-api-current.txt",
        ":frameworks-base-api-system-current.txt",
    ],
    out: ["updated-baseline.txt"],
    tools: ["metalava"],
    cmd: metalava_cmd +
        "--check-compatibility:api:released $(location :android.api.system.latest) " +
        "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
        "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
        "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
        "$(location :frameworks-base-api-system-current.txt)",
}

genrule {
    name: "frameworks-base-api-module-lib-current-compat",
    srcs: [
        ":android.api.module-lib.latest",
        ":android-incompatibilities.api.module-lib.latest",
        ":frameworks-base-api-current.txt",
        ":frameworks-base-api-module-lib-current.txt",
    ],
    out: ["updated-baseline.txt"],
    tools: ["metalava"],
    cmd: metalava_cmd +
        "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
        // Note: having "public" be the base of module-lib is not perfect -- it should
        // ideally be a merged public+system (which metalava is not currently able to generate).
        // This "base" will help when migrating from MODULE_LIBS -> public, but not when
        // migrating from MODULE_LIBS -> system (where it needs to instead be listed as
        // an incompatibility).
        "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
        "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
        "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
        "$(location :frameworks-base-api-module-lib-current.txt)",
}

// This produces the same annotations.zip as framework-doc-stubs, but by using
// outputs from individual modules instead of all the source code.
genrule_defaults {
    name: "sdk-annotations-defaults",
    out: ["annotations.zip"],
    tools: [
        "merge_annotation_zips",
        "soong_zip",
    ],
    cmd: "$(location merge_annotation_zips) $(genDir)/out $(in) && " +
        "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
}

genrule {
    name: "sdk-annotations.zip",
    defaults: ["sdk-annotations-defaults"],
    srcs: [
        ":android-non-updatable-doc-stubs{.annotations.zip}",
        ":all-modules-public-annotations",
    ],
}

genrule {
    name: "sdk-annotations-system.zip",
    defaults: ["sdk-annotations-defaults"],
    srcs: [
        ":android-non-updatable-doc-stubs-system{.annotations.zip}",
        ":all-modules-system-annotations",
    ],
}

genrule {
    name: "sdk-annotations-module-lib.zip",
    defaults: ["sdk-annotations-defaults"],
    srcs: [
        ":android-non-updatable-doc-stubs-module-lib{.annotations.zip}",
        ":all-modules-module-lib-annotations",
    ],
}

genrule {
    name: "sdk-annotations-system-server.zip",
    defaults: ["sdk-annotations-defaults"],
    srcs: [
        ":android-non-updatable-doc-stubs-system-server{.annotations.zip}",
        ":all-modules-system-server-annotations",
    ],
}

genrule {
    name: "combined-removed-dex",
    visibility: [
        "//frameworks/base/boot",
    ],
    srcs: [
        ":frameworks-base-api-removed.txt",
        ":frameworks-base-api-system-removed.txt",
        ":android.car-stubs-docs{.removed-api.txt}",
        ":android.car-system-stubs-docs{.removed-api.txt}",
    ],
    tool_files: ["gen_combined_removed_dex.sh"],
    tools: ["metalava"],
    out: ["combined-removed-dex.txt"],
    cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
}
