diff options
author | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2019-11-04 04:16:39 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-11-04 04:16:39 -0800 |
commit | 1620f98e4ac865584e2be04224d5b0d900b083ef (patch) | |
tree | fb603ca16becb440d536622ec278e0ac0d6bed40 | |
parent | f32771705489791c7e079acf398bc96e537ae55c (diff) | |
parent | 67fe364f2e021797c7b87db94ebbac05b08f9f72 (diff) | |
download | ml-1620f98e4ac865584e2be04224d5b0d900b083ef.tar.gz |
Merge "Add testing version of NNAPI Apex for e2e tests." am: 61afe97b12
am: 67fe364f2e
Change-Id: I1249c9aba910f9fbfcd19e8d3d737468ef7e783b
-rw-r--r-- | nn/apex/Android.bp | 17 | ||||
-rw-r--r-- | nn/apex/AndroidManifest.xml | 29 | ||||
-rw-r--r-- | nn/apex/testing/Android.bp | 25 | ||||
-rw-r--r-- | nn/apex/testing/test_apex_manifest.json | 4 |
4 files changed, 72 insertions, 3 deletions
diff --git a/nn/apex/Android.bp b/nn/apex/Android.bp index 1685eb1ab..75ed80e38 100644 --- a/nn/apex/Android.bp +++ b/nn/apex/Android.bp @@ -25,11 +25,22 @@ android_app_certificate { certificate: "com.android.neuralnetworks", } -apex { - name: "com.android.neuralnetworks", - manifest: "manifest.json", +filegroup { + name: "com.android.neuralnetworks-androidManifest", + srcs: ["AndroidManifest.xml"], +} + +apex_defaults { + name: "com.android.neuralnetworks-defaults", + androidManifest: ":com.android.neuralnetworks-androidManifest", native_shared_libs: ["libneuralnetworks"], compile_multilib: "both", key: "com.android.neuralnetworks.key", certificate: ":com.android.neuralnetworks.certificate", } + +apex { + name: "com.android.neuralnetworks", + defaults: ["com.android.neuralnetworks-defaults"], + manifest: "manifest.json", +} diff --git a/nn/apex/AndroidManifest.xml b/nn/apex/AndroidManifest.xml new file mode 100644 index 000000000..255d2a501 --- /dev/null +++ b/nn/apex/AndroidManifest.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * 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. + --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.neuralnetworks"> + <!-- APEX does not have classes.dex --> + <application android:hasCode="false" /> + <!-- + * API levels the NeuralNetworks APEX is known to work with. + --> + <uses-sdk + android:minSdkVersion="29" + android:maxSdkVersion="30" + android:targetSdkVersion="30" + /> +</manifest> diff --git a/nn/apex/testing/Android.bp b/nn/apex/testing/Android.bp new file mode 100644 index 000000000..7f6715bf6 --- /dev/null +++ b/nn/apex/testing/Android.bp @@ -0,0 +1,25 @@ +// 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. + +apex { + name: "test_com.android.neuralnetworks", + visibility: [ + "//system/apex/tests", + ], + defaults: ["com.android.neuralnetworks-defaults"], + manifest: "test_apex_manifest.json", + file_contexts: "com.android.neuralnetworks", + // Test APEX, should never be installed + installable: false, +} diff --git a/nn/apex/testing/test_apex_manifest.json b/nn/apex/testing/test_apex_manifest.json new file mode 100644 index 000000000..ecbb6de66 --- /dev/null +++ b/nn/apex/testing/test_apex_manifest.json @@ -0,0 +1,4 @@ +{ + "name": "com.android.neuralnetworks", + "version": 2147483647 +} |