// 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 {
    // 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"],
}

soong_config_module_type_import {
    from: "art/build/SoongConfig.bp",
    module_types: [
        "art_module_sdk",
        "art_module_exports",
    ],
}

// Additional visibility to add to the prebuilt modules that are part of
// the snapshots of the ART sdk/module_exports to ensure that they are
// visible to each other.
prebuilt_visibility = [
    // TODO(b/155921753): Restrict this when prebuilts are in their proper
    // locations.
    "//prebuilts:__subpackages__",
]

// The SDK for the art module apex.
art_module_sdk {
    name: "art-module-sdk",
    host_supported: true,

    // Enable if SOONG_CONFIG_art_module_source_build is true.
    enabled: false,
    soong_config_variables: {
        source_build: {
            enabled: true,
        },
    },

    prebuilt_visibility: prebuilt_visibility,

    target: {
        // Both android and host linux but not windows or darwin.
        linux: {
            native_header_libs: [
                "jni_headers",
                "libartpalette-headers",
                "libnativehelper_header_only",
                "libopenjdkjvmti_headers",
            ],

            native_shared_libs: [
                "libandroidio",
                "libdexfile",
                "libnativebridge",
                "libnativehelper",
                "libnativeloader",
                "libsigchain",
            ],

            native_libs: [
                "libdexfile_support",
            ],

            native_static_libs: [
                "libdexfile_static",
                "libnativehelper_lazy",
            ],
        },

        android: {
            bootclasspath_fragments: [
                // Adds the fragment and its contents to the sdk.
                "art-bootclasspath-fragment",
            ],

            compat_configs: [
                "libcore-platform-compat-config",
            ],

            java_header_libs: [
                // Needed by any module that builds against any non-numeric
                // sdk_version other than "none".
                //
                // This is actually only used for compiling Java 8 and kotlin.
                // Java 9 uses system modules which encapsulates this
                // internally.
                "core-lambda-stubs",

                // Needed by any module that builds against any non-numeric
                // sdk_version other than "none" or "core_platform".
                //
                // This is actually only used for compiling Java 8 and kotlin.
                // Java 9 uses system modules which encapsulates this
                // internally.
                "core.current.stubs",

                // Needed by any module that builds against an sdk_version of
                // "core_platform".
                //
                // This is actually only used for compiling Java 8 and kotlin.
                // Java 9 uses system modules which encapsulates this
                // internally.
                "legacy.core.platform.api.stubs",
                "stable.core.platform.api.stubs",
            ],

            java_sdk_libs: [
                "art.module.public.api",
            ],

            java_system_modules: [
                "art-module-public-api-stubs-system-modules",
                "art-module-intra-core-api-stubs-system-modules",
                "legacy-art-module-platform-api-stubs-system-modules",
                "stable-art-module-platform-api-stubs-system-modules",
                "core-current-stubs-system-modules",
                "legacy-core-platform-api-stubs-system-modules",
                "stable-core-platform-api-stubs-system-modules",
            ],
            native_header_libs: [
                "libnativeloader-headers",
            ],
            native_shared_libs: [
                "libnativebridge_lazy",
                "libnativehelper_compat_libc++",
                "libnativeloader_lazy",
            ],
        },

        linux_bionic: {
            enabled: false,
        },
        darwin: {
            enabled: false,
        },
    },
}

// Exported host tools and libraries.
art_module_exports {
    name: "art-module-host-exports",
    host_supported: true,

    // Enable if SOONG_CONFIG_art_module_source_build is true.
    enabled: false,
    soong_config_variables: {
        source_build: {
            enabled: true,
        },
    },

    prebuilt_visibility: prebuilt_visibility,

    target: {
        host: {
            // Set in target.host because the top level compile_multilib
            // property is fixed to "both" in the sdk/module_exports
            // implementation and cannot be overridden any other way.
            compile_multilib: "64",

            java_libs: [
                "art.module.api.annotations",

                // Needed for grpc-grpc-java
                "okhttp-norepackage",
            ],
            native_binaries: [
                "dex2oat",
                "dex2oatd",
                "dexdump",
                "hiddenapi",
                "oatdump",
                "profman",
                "veridex",
            ],
            native_libs: [
                "libartpalette", // libdexfile dependency
                "libartbase", // libdexfile dependency
            ],
        },

        linux_bionic: {
            enabled: false,
        },
        darwin: {
            enabled: false,
        },
        windows: {
            enabled: false,
        },
    },
}

// Exported tests and supporting libraries
art_module_exports {
    name: "art-module-test-exports",

    // Enable if SOONG_CONFIG_art_module_source_build is true.
    enabled: false,
    soong_config_variables: {
        source_build: {
            enabled: true,
        },
    },

    prebuilt_visibility: prebuilt_visibility,

    java_libs: [
        "core-compat-test-rules",
        "core-test-rules",
        "core-tests-support",
        "okhttp-tests-nojarjar",

        // Needed for CtsJvmtiDeviceRunTestAppBase.
        "art_cts_jvmti_test_library",
        "expected_cts_outputs",

        // Needed for robolectric.
        "core-libart-for-host",
        "okhttp-for-host",

        // Needed for CtsLibcore...TestCases
        "libcore-expectations-knownfailures-jar",
        "libcore-expectations-virtualdeviceknownfailures-jar",

        // Needed for CtsLibcoreOkHttpTestCases
        "okhttp-nojarjar",
    ],

    java_tests: [
        // Needed for CtsJdwpTestCases.
        "apache-harmony-jdwp-tests",

        "libcore-crypto-tests",

        // Needed for CtsLibcoreOjTestCases
        "core-ojtests-public",

        // Needed for CtsLibcoreJsr166TestCases
        "jsr166-tests",

        // Needed for CtsLibcoreTestCases
        "apache-harmony-tests",
        "core-tests",
    ],

    native_shared_libs: [
        "libjavacoretests",
    ],
    native_static_libs: [
        "libctstiagent",
    ],
}
