blob: 72e981c8a60992643a934e621555a78b861d2a0c [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" || matter_enable_java_compilation) {
config("java-build-config") {
if (matter_enable_java_compilation) {
include_dirs = java_matter_controller_dependent_paths
}
}
chip_codegen("java-jni-generate") {
input = "controller-clusters.matter"
generator = "java-jni"
outputs = [
"jni/AccessControlClient-InvokeSubscribeImpl.cpp",
"jni/AccessControlClient-ReadImpl.cpp",
"jni/AccountLoginClient-InvokeSubscribeImpl.cpp",
"jni/AccountLoginClient-ReadImpl.cpp",
"jni/ActionsClient-InvokeSubscribeImpl.cpp",
"jni/ActionsClient-ReadImpl.cpp",
"jni/ActivatedCarbonFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ActivatedCarbonFilterMonitoringClient-ReadImpl.cpp",
"jni/AdministratorCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/AdministratorCommissioningClient-ReadImpl.cpp",
"jni/AirQualityClient-InvokeSubscribeImpl.cpp",
"jni/AirQualityClient-ReadImpl.cpp",
"jni/ApplicationBasicClient-InvokeSubscribeImpl.cpp",
"jni/ApplicationBasicClient-ReadImpl.cpp",
"jni/ApplicationLauncherClient-InvokeSubscribeImpl.cpp",
"jni/ApplicationLauncherClient-ReadImpl.cpp",
"jni/AudioOutputClient-InvokeSubscribeImpl.cpp",
"jni/AudioOutputClient-ReadImpl.cpp",
"jni/BallastConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/BallastConfigurationClient-ReadImpl.cpp",
"jni/BarrierControlClient-InvokeSubscribeImpl.cpp",
"jni/BarrierControlClient-ReadImpl.cpp",
"jni/BasicInformationClient-InvokeSubscribeImpl.cpp",
"jni/BasicInformationClient-ReadImpl.cpp",
"jni/BinaryInputBasicClient-InvokeSubscribeImpl.cpp",
"jni/BinaryInputBasicClient-ReadImpl.cpp",
"jni/BindingClient-InvokeSubscribeImpl.cpp",
"jni/BindingClient-ReadImpl.cpp",
"jni/BooleanStateClient-InvokeSubscribeImpl.cpp",
"jni/BooleanStateClient-ReadImpl.cpp",
"jni/BridgedDeviceBasicInformationClient-InvokeSubscribeImpl.cpp",
"jni/BridgedDeviceBasicInformationClient-ReadImpl.cpp",
"jni/BromateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromateConcentrationMeasurementClient-ReadImpl.cpp",
"jni/BromodichloromethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromodichloromethaneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/BromoformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromoformConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CarbonDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CarbonDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CarbonMonoxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CarbonMonoxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CeramicFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/CeramicFilterMonitoringClient-ReadImpl.cpp",
"jni/ChannelClient-InvokeSubscribeImpl.cpp",
"jni/ChannelClient-ReadImpl.cpp",
"jni/CHIPCallbackTypes.h",
"jni/CHIPGlobalCallbacks.cpp",
"jni/CHIPReadCallbacks.h",
"jni/ChloraminesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChloraminesConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChlorineConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChlorineConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChlorodibromomethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChlorodibromomethaneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChloroformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChloroformConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ColorControlClient-InvokeSubscribeImpl.cpp",
"jni/ColorControlClient-ReadImpl.cpp",
"jni/ContentLauncherClient-InvokeSubscribeImpl.cpp",
"jni/ContentLauncherClient-ReadImpl.cpp",
"jni/CopperConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CopperConcentrationMeasurementClient-ReadImpl.cpp",
"jni/DescriptorClient-InvokeSubscribeImpl.cpp",
"jni/DescriptorClient-ReadImpl.cpp",
"jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp",
"jni/DiagnosticLogsClient-ReadImpl.cpp",
"jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherAlarmClient-ReadImpl.cpp",
"jni/DishwasherModeClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherModeClient-ReadImpl.cpp",
"jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/DissolvedOxygenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/DoorLockClient-InvokeSubscribeImpl.cpp",
"jni/DoorLockClient-ReadImpl.cpp",
"jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ElectricalMeasurementClient-ReadImpl.cpp",
"jni/ElectrostaticFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ElectrostaticFilterMonitoringClient-ReadImpl.cpp",
"jni/EthernetNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/EthernetNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/EthyleneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/EthyleneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/EthyleneOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/EthyleneOxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FanControlClient-InvokeSubscribeImpl.cpp",
"jni/FanControlClient-ReadImpl.cpp",
"jni/FaultInjectionClient-InvokeSubscribeImpl.cpp",
"jni/FaultInjectionClient-ReadImpl.cpp",
"jni/FecalColiformEColiConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FecalColiformEColiConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FixedLabelClient-InvokeSubscribeImpl.cpp",
"jni/FixedLabelClient-ReadImpl.cpp",
"jni/FlowMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FlowMeasurementClient-ReadImpl.cpp",
"jni/FluorideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FluorideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FormaldehydeConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FormaldehydeConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FuelTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/FuelTankMonitoringClient-ReadImpl.cpp",
"jni/GeneralCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/GeneralCommissioningClient-ReadImpl.cpp",
"jni/GeneralDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/GeneralDiagnosticsClient-ReadImpl.cpp",
"jni/GroupKeyManagementClient-InvokeSubscribeImpl.cpp",
"jni/GroupKeyManagementClient-ReadImpl.cpp",
"jni/GroupsClient-InvokeSubscribeImpl.cpp",
"jni/GroupsClient-ReadImpl.cpp",
"jni/HaloaceticAcidsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HaloaceticAcidsConcentrationMeasurementClient-ReadImpl.cpp",
"jni/HepaFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/HepaFilterMonitoringClient-ReadImpl.cpp",
"jni/HydrogenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HydrogenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/HydrogenSulfideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HydrogenSulfideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/IcdManagementClient-InvokeSubscribeImpl.cpp",
"jni/IcdManagementClient-ReadImpl.cpp",
"jni/IdentifyClient-InvokeSubscribeImpl.cpp",
"jni/IdentifyClient-ReadImpl.cpp",
"jni/IlluminanceMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/IlluminanceMeasurementClient-ReadImpl.cpp",
"jni/InkCartridgeMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/InkCartridgeMonitoringClient-ReadImpl.cpp",
"jni/IonizingFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/IonizingFilterMonitoringClient-ReadImpl.cpp",
"jni/KeypadInputClient-InvokeSubscribeImpl.cpp",
"jni/KeypadInputClient-ReadImpl.cpp",
"jni/LaundryWasherModeClient-InvokeSubscribeImpl.cpp",
"jni/LaundryWasherModeClient-ReadImpl.cpp",
"jni/LeadConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/LeadConcentrationMeasurementClient-ReadImpl.cpp",
"jni/LevelControlClient-InvokeSubscribeImpl.cpp",
"jni/LevelControlClient-ReadImpl.cpp",
"jni/LocalizationConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/LocalizationConfigurationClient-ReadImpl.cpp",
"jni/LowPowerClient-InvokeSubscribeImpl.cpp",
"jni/LowPowerClient-ReadImpl.cpp",
"jni/ManganeseConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ManganeseConcentrationMeasurementClient-ReadImpl.cpp",
"jni/MediaInputClient-InvokeSubscribeImpl.cpp",
"jni/MediaInputClient-ReadImpl.cpp",
"jni/MediaPlaybackClient-InvokeSubscribeImpl.cpp",
"jni/MediaPlaybackClient-ReadImpl.cpp",
"jni/ModeSelectClient-InvokeSubscribeImpl.cpp",
"jni/ModeSelectClient-ReadImpl.cpp",
"jni/NetworkCommissioningClient-InvokeSubscribeImpl.cpp",
"jni/NetworkCommissioningClient-ReadImpl.cpp",
"jni/NitricOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/NitricOxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/NitrogenDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/NitrogenDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/OccupancySensingClient-InvokeSubscribeImpl.cpp",
"jni/OccupancySensingClient-ReadImpl.cpp",
"jni/OnOffClient-InvokeSubscribeImpl.cpp",
"jni/OnOffClient-ReadImpl.cpp",
"jni/OnOffSwitchConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/OnOffSwitchConfigurationClient-ReadImpl.cpp",
"jni/OperationalCredentialsClient-InvokeSubscribeImpl.cpp",
"jni/OperationalCredentialsClient-ReadImpl.cpp",
"jni/OperationalStateClient-InvokeSubscribeImpl.cpp",
"jni/OperationalStateClient-ReadImpl.cpp",
"jni/OtaSoftwareUpdateProviderClient-InvokeSubscribeImpl.cpp",
"jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp",
"jni/OxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OxygenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/OzoneFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/OzoneFilterMonitoringClient-ReadImpl.cpp",
"jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/Pm10ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm1ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/Pm1ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm25ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/Pm25ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/PowerSourceClient-InvokeSubscribeImpl.cpp",
"jni/PowerSourceClient-ReadImpl.cpp",
"jni/PowerSourceConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/PowerSourceConfigurationClient-ReadImpl.cpp",
"jni/PressureMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/PressureMeasurementClient-ReadImpl.cpp",
"jni/ProxyConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/ProxyConfigurationClient-ReadImpl.cpp",
"jni/ProxyDiscoveryClient-InvokeSubscribeImpl.cpp",
"jni/ProxyDiscoveryClient-ReadImpl.cpp",
"jni/ProxyValidClient-InvokeSubscribeImpl.cpp",
"jni/ProxyValidClient-ReadImpl.cpp",
"jni/PulseWidthModulationClient-InvokeSubscribeImpl.cpp",
"jni/PulseWidthModulationClient-ReadImpl.cpp",
"jni/PumpConfigurationAndControlClient-InvokeSubscribeImpl.cpp",
"jni/PumpConfigurationAndControlClient-ReadImpl.cpp",
"jni/RadonConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/RadonConcentrationMeasurementClient-ReadImpl.cpp",
"jni/RefrigeratorAlarmClient-InvokeSubscribeImpl.cpp",
"jni/RefrigeratorAlarmClient-ReadImpl.cpp",
"jni/RefrigeratorAndTemperatureControlledCabinetModeClient-InvokeSubscribeImpl.cpp",
"jni/RefrigeratorAndTemperatureControlledCabinetModeClient-ReadImpl.cpp",
"jni/RelativeHumidityMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/RelativeHumidityMeasurementClient-ReadImpl.cpp",
"jni/RvcOperationalStateClient-InvokeSubscribeImpl.cpp",
"jni/RvcOperationalStateClient-ReadImpl.cpp",
"jni/RvcCleanModeClient-InvokeSubscribeImpl.cpp",
"jni/RvcCleanModeClient-ReadImpl.cpp",
"jni/RvcRunModeClient-InvokeSubscribeImpl.cpp",
"jni/RvcRunModeClient-ReadImpl.cpp",
"jni/ScenesClient-InvokeSubscribeImpl.cpp",
"jni/ScenesClient-ReadImpl.cpp",
"jni/SmokeCoAlarmClient-InvokeSubscribeImpl.cpp",
"jni/SmokeCoAlarmClient-ReadImpl.cpp",
"jni/SodiumConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SodiumConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SoftwareDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/SoftwareDiagnosticsClient-ReadImpl.cpp",
"jni/SulfateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SulfateConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SulfurDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SulfurDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SwitchClient-InvokeSubscribeImpl.cpp",
"jni/SwitchClient-ReadImpl.cpp",
"jni/TargetNavigatorClient-InvokeSubscribeImpl.cpp",
"jni/TargetNavigatorClient-ReadImpl.cpp",
"jni/TemperatureControlClient-InvokeSubscribeImpl.cpp",
"jni/TemperatureControlClient-ReadImpl.cpp",
"jni/TemperatureMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TemperatureMeasurementClient-ReadImpl.cpp",
"jni/ThermostatClient-InvokeSubscribeImpl.cpp",
"jni/ThermostatClient-ReadImpl.cpp",
"jni/ThermostatUserInterfaceConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/ThermostatUserInterfaceConfigurationClient-ReadImpl.cpp",
"jni/ThreadNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/ThreadNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/TimeFormatLocalizationClient-InvokeSubscribeImpl.cpp",
"jni/TimeFormatLocalizationClient-ReadImpl.cpp",
"jni/TimeSynchronizationClient-InvokeSubscribeImpl.cpp",
"jni/TimeSynchronizationClient-ReadImpl.cpp",
"jni/TonerCartridgeMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/TonerCartridgeMonitoringClient-ReadImpl.cpp",
"jni/TotalColiformBacteriaConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalColiformBacteriaConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TotalTrihalomethanesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalTrihalomethanesConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TurbidityConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TurbidityConcentrationMeasurementClient-ReadImpl.cpp",
"jni/UnitLocalizationClient-InvokeSubscribeImpl.cpp",
"jni/UnitLocalizationClient-ReadImpl.cpp",
"jni/UnitTestingClient-InvokeSubscribeImpl.cpp",
"jni/UnitTestingClient-ReadImpl.cpp",
"jni/UserLabelClient-InvokeSubscribeImpl.cpp",
"jni/UserLabelClient-ReadImpl.cpp",
"jni/UvFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/UvFilterMonitoringClient-ReadImpl.cpp",
"jni/WakeOnLanClient-InvokeSubscribeImpl.cpp",
"jni/WakeOnLanClient-ReadImpl.cpp",
"jni/LaundryWasherControlsClient-InvokeSubscribeImpl.cpp",
"jni/LaundryWasherControlsClient-ReadImpl.cpp",
"jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/WaterTankMonitoringClient-ReadImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/WindowCoveringClient-InvokeSubscribeImpl.cpp",
"jni/WindowCoveringClient-ReadImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-ReadImpl.cpp",
]
deps = [
":data_model",
"${chip_root}/src/platform:platform_buildconfig",
]
public_configs = [ ":java-build-config" ]
}
source_set("java-jni-sources") {
public_configs = [
":java-build-config",
":java-jni-generate_config",
"${chip_root}/src:includes",
]
deps = [
":data_model",
":java-jni-generate",
"${chip_root}/src/inet",
"${chip_root}/src/lib",
"${chip_root}/src/platform",
]
if (matter_enable_java_compilation) {
if (current_os == "mac") {
deps += [ "${chip_root}/src/platform/Darwin" ]
} else {
deps += [ "${chip_root}/src/platform/Linux" ]
}
} else {
deps += [ "${chip_root}/src/platform/android" ]
}
}
}