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

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

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

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)",
}
