Set up framework and service for Nearby module.
Files under framework/api are updated using
`build/soong/scripts/gen-java-current-api-files.sh
"packages/modules/Nearby/framework/api" system- module-lib- && m
update-api`. They are essentially empty as nearby platform APIs do not
exist yet.
Bug: 189355156
Test: mmm -j packages/modules/Nearby
Change-Id: I8df0e459a962b54cbd1a891f1fe2a1474f4cbc75
diff --git a/nearby/service/Android.bp b/nearby/service/Android.bp
new file mode 100644
index 0000000..5b026fa
--- /dev/null
+++ b/nearby/service/Android.bp
@@ -0,0 +1,57 @@
+// Copyright (C) 2021 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"],
+}
+
+filegroup {
+ name: "nearby-service-srcs",
+ srcs: [
+ "java/**/*.java",
+ ],
+}
+
+// Main lib for nearby services.
+java_library {
+ name: "service-nearby",
+ srcs: [":nearby-service-srcs"],
+
+ defaults: [
+ "nearby-module-sdk-version-defaults",
+ "framework-system-server-module-defaults"
+ ],
+ libs: [
+ // pre-jarjar symbols are needed so that nearby-service can reference the original class
+ // names at compile time
+ "framework-nearby-pre-jarjar",
+ ],
+ sdk_version: "system_server_current",
+
+ installable: true,
+ optimize: {
+ enabled: true,
+ shrink: true,
+ },
+ dex_preopt: {
+ enabled: false,
+ app_image: false,
+ },
+ visibility: [
+ "//packages/modules/Nearby/apex",
+ ],
+ apex_available: [
+ "com.android.nearby",
+ ],
+}
\ No newline at end of file