blob: 011669db09524a3126de036728546aaba723f556 [file] [log] [blame]
# Copyright (c) 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("//build_overrides/pigweed.gni")
import("$dir_pw_build/python.gni")
import("${chip_root}/build/chip/chip_codegen.gni")
import("${chip_root}/build/chip/java/config.gni")
import("${chip_root}/src/app/chip_data_model.gni")
chip_data_model("data_model") {
zap_file = "controller-clusters.zap"
zap_pregenerated_dir =
"${chip_root}/zzz_generated/controller-clusters/zap-generated"
allow_circular_includes_from = [ "${chip_root}/src/controller" ]
}
if (current_os == "android" || build_java_matter_controller) {
chip_codegen("java-jni-generate") {
input = "controller-clusters.matter"
generator = "java"
outputs = [
"jni/IdentifyClient-ReadImpl.cpp",
"jni/IdentifyClient-InvokeSubscribeImpl.cpp",
"jni/GroupsClient-ReadImpl.cpp",
"jni/GroupsClient-InvokeSubscribeImpl.cpp",
"jni/ScenesClient-ReadImpl.cpp",
"jni/ScenesClient-InvokeSubscribeImpl.cpp",
"jni/OnOffClient-ReadImpl.cpp",
"jni/OnOffClient-InvokeSubscribeImpl.cpp",
"jni/OnOffSwitchConfigurationClient-ReadImpl.cpp",
"jni/OnOffSwitchConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/LevelControlClient-ReadImpl.cpp",
"jni/LevelControlClient-InvokeSubscribeImpl.cpp",
"jni/BinaryInputBasicClient-ReadImpl.cpp",
"jni/BinaryInputBasicClient-InvokeSubscribeImpl.cpp",
"jni/DescriptorClient-ReadImpl.cpp",
"jni/DescriptorClient-InvokeSubscribeImpl.cpp",
"jni/BindingClient-ReadImpl.cpp",
"jni/BindingClient-InvokeSubscribeImpl.cpp",
"jni/AccessControlClient-ReadImpl.cpp",
"jni/AccessControlClient-InvokeSubscribeImpl.cpp",
"jni/ActionsClient-ReadImpl.cpp",
"jni/ActionsClient-InvokeSubscribeImpl.cpp",
"jni/BasicClient-ReadImpl.cpp",
"jni/BasicClient-InvokeSubscribeImpl.cpp",
"jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp",
"jni/OtaSoftwareUpdateProviderClient-InvokeSubscribeImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp",
"jni/LocalizationConfigurationClient-ReadImpl.cpp",
"jni/LocalizationConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/TimeFormatLocalizationClient-ReadImpl.cpp",
"jni/TimeFormatLocalizationClient-InvokeSubscribeImpl.cpp",
"jni/UnitLocalizationClient-ReadImpl.cpp",
"jni/UnitLocalizationClient-InvokeSubscribeImpl.cpp",
"jni/PowerSourceConfigurationClient-ReadImpl.cpp",
"jni/PowerSourceConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/PowerSourceClient-ReadImpl.cpp",
"jni/PowerSourceClient-InvokeSubscribeImpl.cpp",
"jni/GeneralCommissioningClient-ReadImpl.cpp",
"jni/GeneralCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/NetworkCommissioningClient-ReadImpl.cpp",
"jni/NetworkCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/DiagnosticLogsClient-ReadImpl.cpp",
"jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp",
"jni/GeneralDiagnosticsClient-ReadImpl.cpp",
"jni/GeneralDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/SoftwareDiagnosticsClient-ReadImpl.cpp",
"jni/SoftwareDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/ThreadNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/ThreadNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/EthernetNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/EthernetNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/BridgedDeviceBasicClient-ReadImpl.cpp",
"jni/BridgedDeviceBasicClient-InvokeSubscribeImpl.cpp",
"jni/SwitchClient-ReadImpl.cpp",
"jni/SwitchClient-InvokeSubscribeImpl.cpp",
"jni/AdministratorCommissioningClient-ReadImpl.cpp",
"jni/AdministratorCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/OperationalCredentialsClient-ReadImpl.cpp",
"jni/OperationalCredentialsClient-InvokeSubscribeImpl.cpp",
"jni/GroupKeyManagementClient-ReadImpl.cpp",
"jni/GroupKeyManagementClient-InvokeSubscribeImpl.cpp",
"jni/FixedLabelClient-ReadImpl.cpp",
"jni/FixedLabelClient-InvokeSubscribeImpl.cpp",
"jni/UserLabelClient-ReadImpl.cpp",
"jni/UserLabelClient-InvokeSubscribeImpl.cpp",
"jni/BooleanStateClient-ReadImpl.cpp",
"jni/BooleanStateClient-InvokeSubscribeImpl.cpp",
"jni/ModeSelectClient-ReadImpl.cpp",
"jni/ModeSelectClient-InvokeSubscribeImpl.cpp",
"jni/DoorLockClient-ReadImpl.cpp",
"jni/DoorLockClient-InvokeSubscribeImpl.cpp",
"jni/WindowCoveringClient-ReadImpl.cpp",
"jni/WindowCoveringClient-InvokeSubscribeImpl.cpp",
"jni/BarrierControlClient-ReadImpl.cpp",
"jni/BarrierControlClient-InvokeSubscribeImpl.cpp",
"jni/PumpConfigurationAndControlClient-ReadImpl.cpp",
"jni/PumpConfigurationAndControlClient-InvokeSubscribeImpl.cpp",
"jni/ThermostatClient-ReadImpl.cpp",
"jni/ThermostatClient-InvokeSubscribeImpl.cpp",
"jni/FanControlClient-ReadImpl.cpp",
"jni/FanControlClient-InvokeSubscribeImpl.cpp",
"jni/ThermostatUserInterfaceConfigurationClient-ReadImpl.cpp",
"jni/ThermostatUserInterfaceConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/ColorControlClient-ReadImpl.cpp",
"jni/ColorControlClient-InvokeSubscribeImpl.cpp",
"jni/BallastConfigurationClient-ReadImpl.cpp",
"jni/BallastConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/IlluminanceMeasurementClient-ReadImpl.cpp",
"jni/IlluminanceMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TemperatureMeasurementClient-ReadImpl.cpp",
"jni/TemperatureMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/PressureMeasurementClient-ReadImpl.cpp",
"jni/PressureMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FlowMeasurementClient-ReadImpl.cpp",
"jni/FlowMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/RelativeHumidityMeasurementClient-ReadImpl.cpp",
"jni/RelativeHumidityMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OccupancySensingClient-ReadImpl.cpp",
"jni/OccupancySensingClient-InvokeSubscribeImpl.cpp",
"jni/WakeOnLanClient-ReadImpl.cpp",
"jni/WakeOnLanClient-InvokeSubscribeImpl.cpp",
"jni/ChannelClient-ReadImpl.cpp",
"jni/ChannelClient-InvokeSubscribeImpl.cpp",
"jni/TargetNavigatorClient-ReadImpl.cpp",
"jni/TargetNavigatorClient-InvokeSubscribeImpl.cpp",
"jni/MediaPlaybackClient-ReadImpl.cpp",
"jni/MediaPlaybackClient-InvokeSubscribeImpl.cpp",
"jni/MediaInputClient-ReadImpl.cpp",
"jni/MediaInputClient-InvokeSubscribeImpl.cpp",
"jni/LowPowerClient-ReadImpl.cpp",
"jni/LowPowerClient-InvokeSubscribeImpl.cpp",
"jni/KeypadInputClient-ReadImpl.cpp",
"jni/KeypadInputClient-InvokeSubscribeImpl.cpp",
"jni/ContentLauncherClient-ReadImpl.cpp",
"jni/ContentLauncherClient-InvokeSubscribeImpl.cpp",
"jni/AudioOutputClient-ReadImpl.cpp",
"jni/AudioOutputClient-InvokeSubscribeImpl.cpp",
"jni/ApplicationLauncherClient-ReadImpl.cpp",
"jni/ApplicationLauncherClient-InvokeSubscribeImpl.cpp",
"jni/ApplicationBasicClient-ReadImpl.cpp",
"jni/ApplicationBasicClient-InvokeSubscribeImpl.cpp",
"jni/AccountLoginClient-ReadImpl.cpp",
"jni/AccountLoginClient-InvokeSubscribeImpl.cpp",
"jni/ElectricalMeasurementClient-ReadImpl.cpp",
"jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/UnitTestingClient-ReadImpl.cpp",
"jni/UnitTestingClient-InvokeSubscribeImpl.cpp",
]
}
source_set("java-jni-sources") {
sources = get_target_outputs(":java-jni-generate")
public_configs = [ "${chip_root}/src:includes" ]
deps = [
":data_model",
":java-jni-generate",
"${chip_root}/src/inet",
"${chip_root}/src/lib",
"${chip_root}/src/platform",
]
if (build_java_matter_controller) {
include_dirs = java_matter_controller_dependent_paths
deps += [ "${chip_root}/src/platform/Linux" ]
} else {
deps += [ "${chip_root}/src/platform/android" ]
}
}
}