1// Copyright 2019 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// Defaults shared between production and test versions of the APEX.
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20apex_defaults {
21    name: "com.android.ipsec-defaults",
22    defaults: ["r-launched-apex-module"],
23    bootclasspath_fragments: ["com.android.ipsec-bootclasspath-fragment"],
24    prebuilts: ["current_sdkinfo"],
25    key: "com.android.ipsec.key",
26    certificate: ":com.android.ipsec.certificate",
27    // Indicates that pre-installed version of this apex can be compressed.
28    // Whether it actually will be compressed is controlled on per-device basis.
29    compressible: true,
30}
31
32// Production APEX
33apex {
34    name: "com.android.ipsec",
35    defaults: ["com.android.ipsec-defaults"],
36    manifest: "apex_manifest.json",
37}
38
39apex_key {
40    name: "com.android.ipsec.key",
41    public_key: "com.android.ipsec.avbpubkey",
42    private_key: "com.android.ipsec.pem"
43}
44
45android_app_certificate {
46     name: "com.android.ipsec.certificate",
47
48     // Will use com.android.ipsec.pk8 and com.android.ipsec.x509.pem
49     certificate: "com.android.ipsec",
50}
51
52// Encapsulate the contributions made by the com.android.ipsec to the bootclasspath.
53bootclasspath_fragment {
54    name: "com.android.ipsec-bootclasspath-fragment",
55    contents: ["android.net.ipsec.ike"],
56    apex_available: ["com.android.ipsec"],
57
58    // The bootclasspath_fragments that provide APIs on which this depends.
59    fragments: [
60        {
61            apex: "com.android.art",
62            module: "art-bootclasspath-fragment",
63        },
64        {
65            apex: "com.android.tethering",
66            module: "com.android.tethering-bootclasspath-fragment",
67        },
68    ],
69
70    // Additional stubs libraries that this fragment's contents use which are
71    // not provided by another bootclasspath_fragment.
72    additional_stubs: [
73        "android-non-updatable",
74    ],
75
76    hidden_api: {
77        // This module does not contain any split packages.
78        split_packages: [],
79
80        // The following packages and all their subpackages currently only
81        // contain classes from this bootclasspath_fragment. Listing a package
82        // here won't prevent other bootclasspath modules from adding classes in
83        // any of those packages but it will prevent them from adding those
84        // classes into an API surface, e.g. public, system, etc.. Doing so will
85        // result in a build failure due to inconsistent flags.
86        package_prefixes: [
87            "android.net.eap",
88            "android.net.ipsec",
89            // These look like implementation specific packages which contain
90            // no APIs, not even hidden APIs. If that is the case then please
91            // consider moving the classes in these packages under one of the
92            // previous package_prefixes to avoid exposing these packages in
93            // the hidden API flags that are stored in the SDK snapshot.
94            "com.android.internal.net.crypto",
95            "com.android.internal.net.eap",
96            "com.android.internal.net.ipsec",
97            "com.android.internal.net.org",
98            "com.android.internal.net.utils",
99            "com.android.internal.net.vcn",
100        ],
101    },
102}
103