// Copyright (C) 2024 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 { default_applicable_licenses: ["Android-Apache-2.0"], } java_defaults { name: "cts_backported_fixes_java_defaults", min_sdk_version: "33", // Min SDK where API for Backported Fixes is a GMS requirement. sdk_version: "test_current", } java_library { name: "cts_backported_fixes_annotation", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/BackportedFixTest.java", ], host_supported: true, } java_library { name: "cts_backported_fixes_rule", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/BackportedFixRule.java", ], static_libs: [ "cts_backported_fixes_annotation", "cts_backported_fixes_ids", "cts_backported_fixes_resolver", "junit", ], } // TODO b/382721475 - use androidx libarary when available. java_library { name: "cts_backported_fixes_resolver", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/resolver/*.kt", ], static_libs: [ "android.os.flags-aconfig-java", "androidx.core_core", "cts_backported_fixes_bitset", "cts_backported_fixes_support", ], } // TODO b/382721475 - use androidx libarary when available. java_library { name: "cts_backported_fixes_bitset", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/bitset/*.kt", ], host_supported: true, } // TODO b/382721475 - use androidx libarary when available. java_library { name: "cts_backported_fixes_support", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/support/*.kt", ], host_supported: true, } java_library { name: "cts_backported_fixes_ids", defaults: ["cts_backported_fixes_java_defaults"], srcs: [ "src/com/android/cts/backportedfixes/ApprovedBackportedFixes.java", ], static_libs: [ "guava", "backported_fixes_proto", ], host_supported: true, java_resources: [ ":cts_backported_fixes_binpb", ], } java_library { name: "cts_backported_fixes", defaults: ["cts_backported_fixes_java_defaults"], static_libs: [ "cts_backported_fixes_annotation", "cts_backported_fixes_rule", "cts_backported_fixes_ids", "junit", "guava", ], } genrule { name: "cts_backported_fixes_binpb", defaults: ["default_backported_fixes_combiner"], srcs: [":cts_backported_fixes_binpbs"], out: ["com/android/cts/backportedfixes/backported_fixes.binpb"], } gensrcs { name: "cts_backported_fixes_binpbs", defaults: ["default_backported_fix_binpbs"], output_extension: "binpb", srcs: [ "approved/*.txtpb", ], } java_test_host { name: "cts_backported_fixes_bitset_tests", srcs: [ "tests/com/android/cts/backportedfixes/bitset/*.java", "tests/com/android/cts/backportedfixes/bitset/*.kt", ], static_libs: [ "cts_backported_fixes_bitset", "junit", "truth", ], test_options: { unit_test: true, }, test_suites: ["general-tests"], }