Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Add 'matter_enable_tlv_decoder_api' #28977

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ declare_args() {

# The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters)
matter_enable_java_generated_api = true

# The API of TLV decoder created by ZAP is added to the library.
# If the 'matter_enable_java_generated_api' feature is enabled, this feature must be enabled.
matter_enable_tlv_decoder_api = true

matter_enable_java_compilation = false

if (java_path != "" && current_os == "linux") {
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]

Expand All @@ -31,6 +37,7 @@ declare_args() {
}

matter_enable_java_generated_api = false
matter_enable_tlv_decoder_api = false
matter_enable_java_compilation = true
}
}
18 changes: 13 additions & 5 deletions src/controller/java/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,21 @@ shared_library("jni") {
"${chip_root}/src/platform",
]

if (matter_enable_java_generated_api) {
if (matter_enable_tlv_decoder_api) {
defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ]

sources += [
"CHIPDefaultCallbacks.cpp",
"CHIPDefaultCallbacks.h",
"CHIPTLVValueDecoder-JNI.cpp",
"zap-generated/CHIPAttributeTLVValueDecoder.cpp",
"zap-generated/CHIPClustersWrite-JNI.cpp",
"zap-generated/CHIPEventTLVValueDecoder.cpp",
]
}

if (matter_enable_java_generated_api) {
sources += [
"CHIPDefaultCallbacks.cpp",
"CHIPDefaultCallbacks.h",
"zap-generated/CHIPClustersWrite-JNI.cpp",
"zap-generated/CHIPInvokeCallbacks.cpp",
"zap-generated/CHIPInvokeCallbacks.h",
"zap-generated/CHIPReadCallbacks.cpp",
Expand Down Expand Up @@ -420,6 +425,10 @@ android_library("java") {
"src/chip/devicecontroller/model/NodeState.java",
]

if (matter_enable_tlv_decoder_api) {
sources += [ "src/chip/devicecontroller/ChipTLVValueDecoder.java" ]
}

if (matter_enable_java_generated_api) {
sources += [
"generated/java/chip/devicecontroller/ClusterReadMapping.java",
Expand All @@ -430,7 +439,6 @@ android_library("java") {
"src/chip/clusterinfo/CommandResponseInfo.java",
"src/chip/clusterinfo/DelegatedClusterCallback.java",
"src/chip/clusterinfo/InteractionInfo.java",
"src/chip/devicecontroller/ChipTLVValueDecoder.java",
"zap-generated/chip/devicecontroller/ChipClusters.java",
"zap-generated/chip/devicecontroller/ChipEventStructs.java",
"zap-generated/chip/devicecontroller/ChipStructs.java",
Expand Down