// Copyright (C) 2021 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 {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "art_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["art_license"],
}

cc_library {
    // This native library contains JNI support code for the ART Service Java
    // Language library.

    name: "libartservice",
    defaults: ["art_defaults"],
    host_supported: true,
    srcs: [
        "service/native/service.cc",
    ],
    export_include_dirs: ["."],
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
    ],
    shared_libs: [
        "libbase",
    ],
    export_shared_lib_headers: ["libbase"],
}

// Provides the API and implementation of the ART Service class that will be
// loaded by the System Server.
java_sdk_library {
    // This target is named 'service-art' to conform to the naming conventions
    // for JAR files in the System Server.
    name: "service-art",
    defaults: ["framework-system-server-module-defaults"],

    permitted_packages: ["com.android.server.art"],

    visibility: [
        "//art:__subpackages__",
        "//frameworks/base/services/core",
    ],

    impl_library_visibility: [
        "//art/libartservice/tests",
    ],

    stubs_library_visibility: ["//visibility:public"],
    stubs_source_visibility: ["//visibility:private"],

    apex_available: [
        "com.android.art",
        "com.android.art.debug",
    ],
    sdk_version: "core_platform",
    min_sdk_version: "31",

    // The API elements are the ones annotated with
    //   libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE)
    droiddoc_options: [
        "--show-single-annotation libcore.api.CorePlatformApi\\(status=libcore.api.CorePlatformApi.Status.STABLE\\)",
    ],

    // Temporarily disable compatibility with previous released APIs.
    // TODO - remove once prototype has stabilized
    //   running "m update-api" will give instructions on what to do next
    unsafe_ignore_missing_latest_api: true,

    // This cannot be accessed by apps using <uses-library> in their manifest.
    shared_library: false,
    // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment.
    compile_dex: true,

    srcs: [
        "service/java/com/android/server/art/ArtManagerLocal.java",
    ],

    libs: [
        "art.module.api.annotations.for.system.modules",
    ],

    plugins: ["java_api_finder"],
    dist_group: "android",
}

art_cc_defaults {
    name: "art_libartservice_tests_defaults",
    srcs: [
        "service/native/service_test.cc",
    ],
    shared_libs: [
        "libbase",
        "libartservice",
    ],
}

// Version of ART gtest `art_libartservice_tests` bundled with the ART APEX on target.
// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
art_cc_test {
    name: "art_libartservice_tests",
    defaults: [
        "art_gtest_defaults",
        "art_libartservice_tests_defaults",
    ],
}

// Standalone version of ART gtest `art_libartservice_tests`, not bundled with the ART APEX on
// target.
art_cc_test {
    name: "art_standalone_libartservice_tests",
    defaults: [
        "art_standalone_gtest_defaults",
        "art_libartservice_tests_defaults",
    ],
}
