1// Copyright (C) 2022 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// TODO(b/322944911): Reconsider enabling linter checker
16//package {
17//    default_team: "trendy_team_android_permissions",
18//   default_applicable_licenses: ["Android-Apache-2.0"],
19//}
20
21//java_library_host {
22//    name: "ConfigLintChecker",
23//    srcs: [
24//        "java/**/*.java",
25//        "java/**/*.kt",
26//        ":safetycenter-annotations-sources",
27//        ":safetycenter-config-api-sources",
28//        ":safetycenter-config-parser-sources",
29//    ],
30//    plugins: ["auto_service_plugin"],
31//    libs: [
32//        "androidx.annotation_annotation", // For androidx.annotation.RequiresApi
33//        "auto_service_annotations",
34//        "core-xml-for-host", // For org.xmlpull.v1.*
35//        "framework-annotations-lib", // For com.android.annotation.*
36//        "layoutlib_api-prebuilt", // For com.android.resources.ResourceFolderType
37//        "lint_api",
38//    ],
39//    java_resources: [":safetycenter-config-schemas"],
40//    jarjar_rules: "jarjar-rules.txt",
41//    kotlincflags: ["-Xjvm-default=all"],
42//    visibility: [
43//        "//packages/modules/Permission:__subpackages__",
44//        "//vendor:__subpackages__",
45//    ],
46//}
47
48//java_test_host {
49//    name: "ConfigLintCheckerTest",
50//    srcs: [
51//        "tests/java/**/*.kt",
52//    ],
53//    static_libs: [
54//        "ConfigLintChecker",
55//        "junit",
56//        "lint",
57//        "lint_tests",
58//    ],
59//    test_options: {
60//        unit_test: true,
61//        tradefed_options: [
62//            {
63//                // lint bundles in some classes that were built with older versions
64//                // of libraries, and no longer load. Since tradefed tries to load
65//                // all classes in the jar to look for tests, it crashes loading them.
66//                // Exclude these classes from tradefed's search.
67//                name: "exclude-paths",
68//                value: "org/apache",
69//            },
70//            {
71//                name: "exclude-paths",
72//                value: "META-INF",
73//            },
74//        ],
75//    },
76//}
77