| # Copyright (c) 2020-2021 Project CHIP Authors |
| # |
| # 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. |
| |
| import("//build_overrides/build.gni") |
| import("//build_overrides/chip.gni") |
| |
| import("${chip_root}/src/platform/device.gni") |
| |
| import("${build_root}/config/android_abi.gni") |
| import("${chip_root}/build/chip/java/rules.gni") |
| |
| assert(chip_device_platform == "android") |
| |
| static_library("android") { |
| output_name = "libAndroidPlatform" |
| |
| sources = [ |
| "../DeviceSafeQueue.cpp", |
| "../DeviceSafeQueue.h", |
| "AndroidChipPlatform-JNI.cpp", |
| "AndroidConfig.cpp", |
| "AndroidConfig.h", |
| "BLEManagerImpl.cpp", |
| "BLEManagerImpl.h", |
| "BlePlatformConfig.h", |
| "CHIPDevicePlatformEvent.h", |
| "ConfigurationManagerImpl.cpp", |
| "ConfigurationManagerImpl.h", |
| "ConnectivityManagerImpl.cpp", |
| "ConnectivityManagerImpl.h", |
| "DeviceNetworkProvisioningDelegateImpl.cpp", |
| "DeviceNetworkProvisioningDelegateImpl.h", |
| "DnssdImpl.cpp", |
| "DnssdImpl.h", |
| "KeyValueStoreManagerImpl.cpp", |
| "KeyValueStoreManagerImpl.h", |
| "PlatformManagerImpl.cpp", |
| "PlatformManagerImpl.h", |
| ] |
| |
| deps = [ |
| "${chip_root}/src/lib/dnssd:platform_header", |
| "${chip_root}/src/setup_payload", |
| ] |
| |
| public_deps = [ "${chip_root}/src/platform:platform_base" ] |
| |
| public_configs = [] |
| } |
| |
| android_library("java") { |
| output_name = "AndroidPlatform.jar" |
| |
| deps = [ ":android_sdk" ] |
| data_deps = [ ":android" ] |
| |
| sources = [ |
| "java/chip/platform/AndroidBleManager.java", |
| "java/chip/platform/AndroidChipPlatform.java", |
| "java/chip/platform/AndroidChipPlatformException.java", |
| "java/chip/platform/BleCallback.java", |
| "java/chip/platform/BleManager.java", |
| "java/chip/platform/ChipMdnsCallback.java", |
| "java/chip/platform/ChipMdnsCallbackImpl.java", |
| "java/chip/platform/ConfigurationManager.java", |
| "java/chip/platform/KeyValueStoreManager.java", |
| "java/chip/platform/NsdManagerServiceResolver.java", |
| "java/chip/platform/PreferencesConfigurationManager.java", |
| "java/chip/platform/PreferencesKeyValueStoreManager.java", |
| "java/chip/platform/ServiceResolver.java", |
| ] |
| |
| javac_flags = [ "-Xlint:deprecation" ] |
| } |
| |
| java_prebuilt("android_sdk") { |
| jar_path = "${android_sdk_root}/platforms/android-21/android.jar" |
| } |