| // Copyright (C) 2025 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"], |
| } |
| |
| apex_key { |
| name: "com.android.webapp.key", |
| public_key: "com.android.webapp.avbpubkey", |
| private_key: "com.android.webapp.pem", |
| } |
| |
| android_app_certificate { |
| name: "com.android.webapp.certificate", |
| certificate: "com.android.webapp", |
| } |
| |
| apex { |
| // This apex will be enabled using RELEASE_WEBAPP_MODULE flag |
| enabled: select(release_flag("RELEASE_WEBAPP_MODULE"), { |
| true: true, |
| false: false, |
| }), |
| |
| name: "com.android.webapp", |
| manifest: "manifest.json", |
| file_contexts: ":com.android.webapp-file_contexts", |
| key: "com.android.webapp.key", |
| certificate: ":com.android.webapp.certificate", |
| defaults: ["b-launched-apex-module"], |
| |
| // AAPT2 is required to compile resources |
| binaries: ["aapt2"], |
| prebuilts: ["webapp-template-res"], |
| apps: ["WebAppService"], |
| bootclasspath_fragments: ["com.android.webapp-bootclasspath-fragment"], |
| |
| licenses: [ |
| "Android-Apache-2.0", |
| "opensourcerequest", |
| ], |
| } |
| |
| sdk { |
| // This mainline SDK will be enabled using RELEASE_WEBAPP_MODULE flag |
| enabled: select(release_flag("RELEASE_WEBAPP_MODULE"), { |
| true: true, |
| false: false, |
| }), |
| |
| name: "webapp-module-sdk", |
| bootclasspath_fragments: ["com.android.webapp-bootclasspath-fragment"], |
| apexes: ["com.android.webapp"], |
| } |
| |
| bootclasspath_fragment { |
| // This mainline SDK will be enabled using RELEASE_WEBAPP_MODULE flag |
| enabled: select(release_flag("RELEASE_WEBAPP_MODULE"), { |
| true: true, |
| false: false, |
| }), |
| |
| name: "com.android.webapp-bootclasspath-fragment", |
| contents: ["framework-webapp"], |
| apex_available: ["com.android.webapp"], |
| // The bootclasspath_fragments that provide APIs on which this depends. |
| fragments: [ |
| { |
| apex: "com.android.art", |
| module: "art-bootclasspath-fragment", |
| }, |
| ], |
| |
| dex_preopt: { |
| profile: "packages/modules/WebApp/apex/boot-image-profile.txt", |
| }, |
| |
| // Additional stubs libraries that this fragment's contents use which are |
| // not provided by another bootclasspath_fragment. |
| additional_stubs: [ |
| // Needed to access platform APIs. |
| "android-non-updatable", |
| ], |
| |
| // Additional hidden API flag files to override the defaults. This must only be |
| // modified by the Soong or platform compat team. |
| hidden_api: { |
| // The following packages contain classes from other modules on the |
| // bootclasspath. That means that the hidden API flags for this module |
| // has to explicitly list every single class this module provides in |
| // that package to differentiate them from the classes provided by other |
| // modules. That can include private classes that are not part of the |
| // API. |
| package_prefixes: [ |
| "android.content.pm.webapp", |
| "com.android.webapp", |
| ], |
| }, |
| } |