1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_team: "trendy_team_fwk_core_networking", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22java_defaults { 23 name: "CaptivePortalLoginDefaults", 24 sdk_version: "module_current", 25 min_sdk_version: "30", 26 target_sdk_version: "35", // Keep in sync with CaptivePortalLoginTests 27 lint: { 28 strict_updatability_linting: true, 29 }, 30 optimize: { 31 ignore_warnings: false, 32 }, 33} 34 35android_library { 36 name: "CaptivePortalLoginLib", 37 defaults: ["CaptivePortalLoginDefaults"], 38 srcs: ["src/**/*.java"], 39 static_libs: [ 40 "androidx.annotation_annotation", 41 "androidx.browser_browser", 42 "androidx.legacy_legacy-support-core-ui", 43 "captiveportal-lib", 44 "metrics-constants-protos", 45 "net-utils-connectivity-apks", 46 ], 47 libs: [ 48 "framework-connectivity.stubs.module_lib", 49 "framework-mediaprovider.stubs.module_lib", 50 "framework-wifi.stubs.module_lib", 51 ], 52 manifest: "AndroidManifest.xml", 53} 54 55java_genrule { 56 name: "CaptivePortalLoginJarJarRules", 57 tool_files: [ 58 ":CaptivePortalLoginLib{.jar}", 59 "jarjar-excludes.txt", 60 ], 61 tools: [ 62 "jarjar-rules-generator", 63 ], 64 out: ["CaptivePortalLoginJarJarRules.txt"], 65 cmd: "$(location jarjar-rules-generator) " + 66 "$(location :CaptivePortalLoginLib{.jar}) " + 67 "--excludes $(location jarjar-excludes.txt) " + 68 "--prefix com.android.captiveportallogin " + 69 "--output $(out)", 70 visibility: [ 71 "//packages/modules/CaptivePortalLogin:__subpackages__", 72 ], 73} 74 75android_app { 76 name: "CaptivePortalLogin", 77 defaults: ["CaptivePortalLoginDefaults"], 78 static_libs: ["CaptivePortalLoginLib"], 79 jarjar_rules: ":CaptivePortalLoginJarJarRules", 80 certificate: "networkstack", 81 updatable: true, 82} 83 84android_library { 85 name: "CaptivePortalLoginTestLib", 86 defaults: ["CaptivePortalLoginDefaults"], 87 static_libs: [ 88 "CaptivePortalLoginLib", 89 "net-tests-utils", 90 ], 91 lint: { 92 strict_updatability_linting: true, 93 }, 94} 95 96// Alternative CaptivePortalLogin signed with the platform cert, to use 97// with InProcessNetworkStack. 98android_app { 99 name: "PlatformCaptivePortalLogin", 100 defaults: ["CaptivePortalLoginDefaults"], 101 static_libs: ["CaptivePortalLoginLib"], 102 certificate: "platform", 103 overrides: ["CaptivePortalLogin"], 104 lint: { 105 strict_updatability_linting: true, 106 }, 107} 108