// 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.

package {
    // 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
    default_applicable_licenses: ["frameworks_base_license"],
}

java_defaults {
    name: "mimemap-defaults",
    srcs: [
        "java/android/content/type/DefaultMimeMapFactory.java",
    ],
    sdk_version: "core_platform",
}

java_library {
    name: "mimemap",
    defaults: ["mimemap-defaults"],
    static_libs: ["mimemap-res.jar"],
    visibility: [
        "//frameworks/base:__subpackages__",
    ],
}

java_library {
    name: "mimemap-testing",
    defaults: ["mimemap-defaults"],
    static_libs: ["mimemap-testing-res.jar"],
    jarjar_rules: "jarjar-rules.txt",
    visibility: [
        "//cts/tests/tests/mimemap:__subpackages__",
        "//frameworks/base:__subpackages__",
    ],
}

java_library {
    name: "mimemap-testing-alt",
    defaults: ["mimemap-defaults"],
    static_libs: ["mimemap-testing-alt-res.jar"],
    jarjar_rules: "jarjar-rules-alt.txt",
    visibility: [
        "//cts/tests/tests/mimemap:__subpackages__",
        "//frameworks/base:__subpackages__",
    ],
}

// The mimemap-res.jar and mimemap-testing-res.jar genrules produce a .jar that
// has the resource file in a subdirectory res/ and testres/, respectively.
// They need to be in different paths because one of them ends up in a
// bootclasspath jar whereas the other one ends up in a test jar. Bootclasspath
// resources hide test or application resources under the same path because
// ClassLoader.getResource(String) consults the parent ClassLoader first.
//
// Further notes:
//  - the "cp" command will flatten any directory paths that occur in $(in),
//    but here they happen to already be in the root directory. If we needed
//    to preserve sub paths then we might want to zip the files first and then
//    unzip them below the new parent directory.
//  - the path names "res/" and "testres/" and duplicated in .java source files
//    (DefaultMimeMapFactory.java and MimeMapTest.java, as of October 2019).
java_genrule {
    name: "mimemap-res.jar",
    tools: [
        "soong_zip",
    ],
    srcs: [":mime.types.minimized"],
    out: ["mimemap-res.jar"],
    cmd: "mkdir $(genDir)/res/ && cp $(in) $(genDir)/res/ && $(location soong_zip) -C $(genDir) -o $(out) -D $(genDir)/res/",
}

// The same as mimemap-res.jar except that the resources are placed in a different directory.
// They get bundled with CTS so that CTS can compare a device's MimeMap implementation vs.
// the stock Android one from when CTS was built.
java_genrule {
    name: "mimemap-testing-res.jar",
    tools: [
        "soong_zip",
    ],
    srcs: [":mime.types.minimized"],
    out: ["mimemap-testing-res.jar"],
    cmd: "mkdir $(genDir)/testres/ && cp $(in) $(genDir)/testres/ && $(location soong_zip) -C $(genDir) -o $(out) -D $(genDir)/testres/",
}

// The same as mimemap-testing-res.jar except that the resources are placed in a different directory.
// They get bundled with CTS so that CTS can compare a device's MimeMap implementation vs.
// the stock Android one from when CTS was built.
java_genrule {
    name: "mimemap-testing-alt-res.jar",
    tools: [
        "soong_zip",
    ],
    srcs: [":mime.types.minimized-alt"],
    out: ["mimemap-testing-alt-res.jar"],
    cmd: "mkdir $(genDir)/testres-alt/ && cp $(in) $(genDir)/testres-alt/ && $(location soong_zip) -C $(genDir) -o $(out) -D $(genDir)/testres-alt/",
}

// Combination of all *mime.types.minimized resources.
filegroup {
    name: "mime.types.minimized",
    visibility: [
        "//visibility:private",
    ],
    device_common_srcs: [
        ":debian.mime.types.minimized",
        ":android.mime.types.minimized",
        ":vendor.mime.types.minimized",
    ],
}

// Combination of all *mime.types.minimized resources.
filegroup {
    name: "mime.types.minimized-alt",
    visibility: [
        "//visibility:private",
    ],
    device_common_srcs: [
        ":debian.mime.types.minimized-alt",
        ":android.mime.types.minimized",
        ":vendor.mime.types.minimized",
    ],
}

java_genrule {
    name: "android.mime.types.minimized",
    visibility: [
        "//visibility:private",
    ],
    out: ["android.mime.types"],
    srcs: [
        "java-res/android.mime.types",
    ],
    //    strip comments            normalize whitepace       drop empty lines
    cmd: "awk '{gsub(/#.*$$/,\"\"); $$1=$$1; print;}' $(in) | grep ' ' > $(out)",
}

// Unlike the other *mime.types files, vendor.mime.types gets '?' prepended to
// every field so that its mappings will never overwrite earlier mappings by
// the other resource files. http://b/141842825
java_genrule {
    name: "vendor.mime.types.minimized",
    visibility: [
        "//visibility:private",
    ],
    out: ["vendor.mime.types"],
    srcs: [
        "java-res/vendor.mime.types",
    ],
    //    strip comments            normalize whitepace       drop empty lines           prepend ? to fields that are missing it
    cmd: "awk '{gsub(/#.*$$/,\"\"); $$1=$$1; print;}' $(in) | (grep ' ' || echo -n '') | awk '{for(i=1;i<=NF;i++) { sub(/^\\??/, \"?\", $$i); }; print}' > $(out)",
}
