blob: 65fb67e76b5f2e5e70aff39165d6f7d2d06474d4 [file] [log] [blame]
# 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",
"../SingletonConfigurationManager.cpp",
"AndroidChipPlatform-JNI.cpp",
"AndroidConfig.cpp",
"AndroidConfig.h",
"BLEManagerImpl.cpp",
"BLEManagerImpl.h",
"BlePlatformConfig.h",
"CHIPDevicePlatformEvent.h",
"CHIPP256KeypairBridge.cpp",
"CHIPP256KeypairBridge.h",
"CommissionableDataProviderImpl.cpp",
"CommissionableDataProviderImpl.h",
"ConfigurationManagerImpl.cpp",
"ConfigurationManagerImpl.h",
"ConnectivityManagerImpl.cpp",
"ConnectivityManagerImpl.h",
"DeviceInstanceInfoProviderImpl.cpp",
"DeviceInstanceInfoProviderImpl.h",
"DiagnosticDataProviderImpl.cpp",
"DiagnosticDataProviderImpl.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",
"${chip_root}/src/trace",
]
public_deps = [ "${chip_root}/src/platform:platform_base" ]
public_configs = []
}
android_library("java") {
output_name = "AndroidPlatform.jar"
deps = [
":android_sdk",
"${chip_root}/third_party/android_deps:annotation",
]
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/DiagnosticDataProvider.java",
"java/chip/platform/DiagnosticDataProviderImpl.java",
"java/chip/platform/KeyValueStoreManager.java",
"java/chip/platform/NetworkInterface.java",
"java/chip/platform/NsdManagerServiceBrowser.java",
"java/chip/platform/NsdManagerServiceResolver.java",
"java/chip/platform/PreferencesConfigurationManager.java",
"java/chip/platform/PreferencesKeyValueStoreManager.java",
"java/chip/platform/ServiceBrowser.java",
"java/chip/platform/ServiceResolver.java",
]
javac_flags = [ "-Xlint:deprecation" ]
}
java_prebuilt("android_sdk") {
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
}