Use apex_defaults for Conscrypt module.
Bug: 124054460
Test: m com.android.conscrypt test_com.android.conscrypt
Change-Id: I7004c165ea1f1e95726780f247635cdbe2490da2
diff --git a/apex/Android.bp b/apex/Android.bp
index 78c150d..50d26c7 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-apex {
- name: "com.android.conscrypt",
- manifest: "apex_manifest.json",
+// Defaults shared between real and test versions of the APEX.
+apex_defaults {
+ name: "com.android.conscrypt-defaults",
compile_multilib: "both",
java_libs: ["conscrypt"],
native_shared_libs: ["libjavacrypto"],
@@ -26,3 +26,10 @@
public_key: "com.android.conscrypt.avbpubkey",
private_key: "com.android.conscrypt.pem",
}
+
+// Production APEX
+apex {
+ name: "com.android.conscrypt",
+ defaults: ["com.android.conscrypt-defaults"],
+ manifest: "apex_manifest.json",
+}
diff --git a/apex/testing/Android.bp b/apex/testing/Android.bp
index 4494455..da8b9e3 100644
--- a/apex/testing/Android.bp
+++ b/apex/testing/Android.bp
@@ -14,12 +14,9 @@
apex {
name: "test_com.android.conscrypt",
+ defaults: ["com.android.conscrypt-defaults"],
manifest: "test_apex_manifest.json",
file_contexts: "com.android.conscrypt",
- compile_multilib: "both",
- java_libs: ["conscrypt"],
- native_shared_libs: ["libjavacrypto"],
- key: "apex.conscrypt.key",
// Test APEX, should never be installed
installable: false
}