// // 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 { default_team: "trendy_team_fwk_core_networking", default_applicable_licenses: ["Android-Apache-2.0"], } java_defaults { name: "CaptivePortalLoginDefaults", sdk_version: "module_current", min_sdk_version: "30", target_sdk_version: "35", // Keep in sync with CaptivePortalLoginTests lint: { strict_updatability_linting: true, }, optimize: { ignore_warnings: false, }, } android_library { name: "CaptivePortalLoginLib", defaults: ["CaptivePortalLoginDefaults"], srcs: ["src/**/*.java"], static_libs: [ "androidx.annotation_annotation", "androidx.browser_browser", "androidx.legacy_legacy-support-core-ui", "captiveportal-lib", "metrics-constants-protos", "net-utils-connectivity-apks", ], libs: [ "framework-connectivity.stubs.module_lib", "framework-mediaprovider.stubs.module_lib", "framework-wifi.stubs.module_lib", ], manifest: "AndroidManifest.xml", } java_genrule { name: "CaptivePortalLoginJarJarRules", tool_files: [ ":CaptivePortalLoginLib{.jar}", "jarjar-excludes.txt", ], tools: [ "jarjar-rules-generator", ], out: ["CaptivePortalLoginJarJarRules.txt"], cmd: "$(location jarjar-rules-generator) " + "$(location :CaptivePortalLoginLib{.jar}) " + "--excludes $(location jarjar-excludes.txt) " + "--prefix com.android.captiveportallogin " + "--output $(out)", visibility: [ "//packages/modules/CaptivePortalLogin:__subpackages__", ], } android_app { name: "CaptivePortalLogin", defaults: ["CaptivePortalLoginDefaults"], static_libs: ["CaptivePortalLoginLib"], jarjar_rules: ":CaptivePortalLoginJarJarRules", certificate: "networkstack", updatable: true, } android_library { name: "CaptivePortalLoginTestLib", defaults: ["CaptivePortalLoginDefaults"], static_libs: [ "CaptivePortalLoginLib", "net-tests-utils", ], lint: { strict_updatability_linting: true, }, } // Alternative CaptivePortalLogin signed with the platform cert, to use // with InProcessNetworkStack. android_app { name: "PlatformCaptivePortalLogin", defaults: ["CaptivePortalLoginDefaults"], static_libs: ["CaptivePortalLoginLib"], certificate: "platform", overrides: ["CaptivePortalLogin"], lint: { strict_updatability_linting: true, }, }