# Copyright (c) 2020-2023 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}/build/chip/java/config.gni")
import("${chip_root}/build/chip/java/rules.gni")
import("${chip_root}/build/chip/tests.gni")
import("${chip_root}/src/app/common_flags.gni")
import("${chip_root}/src/platform/device.gni")

if (!matter_enable_java_compilation) {
  import("${build_root}/config/android_abi.gni")
}

shared_library("jni") {
  output_name = "libCHIPController"

  if (current_os == "mac") {
    output_extension = "dylib"
  }

  defines = []

  # Temporary while we have circular dependencies between codegen.py and zap
  # generated files
  check_includes = false

  sources = [
    "AndroidCallbacks-JNI.cpp",
    "AndroidCallbacks.cpp",
    "AndroidCallbacks.h",
    "AndroidCheckInDelegate.cpp",
    "AndroidCheckInDelegate.h",
    "AndroidClusterExceptions.cpp",
    "AndroidClusterExceptions.h",
    "AndroidCommissioningWindowOpener.cpp",
    "AndroidCommissioningWindowOpener.h",
    "AndroidConnectionFailureExceptions.cpp",
    "AndroidConnectionFailureExceptions.h",
    "AndroidControllerExceptions.cpp",
    "AndroidControllerExceptions.h",
    "AndroidCurrentFabricRemover.cpp",
    "AndroidCurrentFabricRemover.h",
    "AndroidDeviceControllerWrapper.cpp",
    "AndroidDeviceControllerWrapper.h",
    "AndroidInteractionClient.cpp",
    "AndroidInteractionClient.h",
    "AndroidOperationalCredentialsIssuer.cpp",
    "AndroidOperationalCredentialsIssuer.h",
    "AttestationTrustStoreBridge.cpp",
    "AttestationTrustStoreBridge.h",
    "BaseCHIPCluster-JNI.cpp",
    "CHIPAttributeTLVValueDecoder.h",
    "CHIPDeviceController-JNI.cpp",
    "CHIPEventTLVValueDecoder.h",
    "DeviceAttestation-JNI.cpp",
    "DeviceAttestationDelegateBridge.cpp",
    "DeviceAttestationDelegateBridge.h",
    "GroupDeviceProxy.h",
    "MatterCallbacks-JNI.cpp",
    "MatterInteractionClient-JNI.cpp",
  ]

  deps = [
    "${chip_root}/src/app/icd/client:handler",
    "${chip_root}/src/app/icd/client:manager",
    "${chip_root}/src/credentials:default_attestation_verifier",
    "${chip_root}/src/inet",
    "${chip_root}/src/lib",
    "${chip_root}/src/lib/support/jsontlv",
    "${chip_root}/src/platform",
  ]

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

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

  if (chip_build_controller_dynamic_server) {
    sources += [
      "BdxOTASender.cpp",
      "BdxOTASender.h",
      "OTAProviderDelegateBridge.cpp",
      "OTAProviderDelegateBridge.h",
    ]

    defines += [
      "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
      "CHIP_DEVICE_CONFIG_DYNAMIC_SERVER",
    ]

    deps += [ "${chip_root}/src/controller:nodatamodel" ]
  }

  if (matter_enable_java_compilation) {
    defines += [ "JAVA_MATTER_CONTROLLER_TEST" ]

    sources += [
      "${chip_root}/src/controller/ExamplePersistentStorage.cpp",
      "${chip_root}/src/controller/ExamplePersistentStorage.h",
    ]

    include_dirs = java_matter_controller_dependent_paths
    include_dirs += [ "${chip_root}/zzz_generated/controller-clusters" ]

    deps += [ "${chip_root}/third_party/inipp" ]

    if (current_os == "mac") {
      deps += [ "${chip_root}/src/platform/Darwin" ]
    } else {
      deps += [ "${chip_root}/src/platform/Linux" ]
    }

    cflags = [
      "-Wno-unknown-pragmas",
      "-Wconversion",
    ]

    output_dir = "${root_out_dir}/lib/jni"
  } else {
    deps += [ "${chip_root}/src/platform/android" ]

    output_dir = "${root_out_dir}/lib/jni/${android_abi}"
  }

  if (current_os == "mac") {
    ldflags = [ "-Wl,-dead_strip" ]
  } else {
    ldflags = [ "-Wl,--gc-sections" ]
  }

  public_configs = [ "${chip_root}/src:includes" ]
}

if (chip_link_tests) {
  shared_library("jni_for_test") {
    sources = [ "AndroidCallbacks-ForTestJNI.cpp" ]
    output_name = "libCHIPForTestController"

    public_configs = [ "${chip_root}/src:includes" ]

    deps = [
      ":jni",
      "${chip_root}/src/messaging/tests:helpers",
    ]

    if (matter_enable_java_compilation) {
      defines = [ "JAVA_MATTER_CONTROLLER_TEST" ]
      include_dirs = java_matter_controller_dependent_paths
      if (current_os == "mac") {
        deps += [ "${chip_root}/src/platform/Darwin" ]
      } else {
        deps += [ "${chip_root}/src/platform/Linux" ]
      }

      cflags = [
        "-Wno-unknown-pragmas",
        "-Wconversion",
      ]

      output_dir = "${root_out_dir}/lib/jni"
    } else {
      deps += [ "${chip_root}/src/platform/android" ]

      output_dir = "${root_out_dir}/lib/jni/${android_abi}"
    }

    ldflags = [ "-Wl,--gc-sections" ]
  }
}

kotlin_library("tlv") {
  output_name = "libMatterTlv.jar"

  sources = [
    "src/matter/tlv/Element.kt",
    "src/matter/tlv/TlvReader.kt",
    "src/matter/tlv/TlvWriter.kt",
    "src/matter/tlv/tags.kt",
    "src/matter/tlv/types.kt",
    "src/matter/tlv/utils.kt",
    "src/matter/tlv/values.kt",
  ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_reader_test") {
  output_name = "TlvReaderTest.jar"

  deps = [
    ":tlv",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/tlv/TlvReaderTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_writer_test") {
  output_name = "TlvWriterTest.jar"

  deps = [
    ":tlv",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/tlv/TlvWriterTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_read_write_test") {
  output_name = "TlvReadWriteTest.jar"

  deps = [
    ":tlv",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:kotlin-test",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/tlv/TlvReadWriteTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("jsontlv") {
  output_name = "libMatterJson.jar"

  deps = [
    ":tlv",
    "${chip_root}/third_party/java_deps:gson",
    "${chip_root}/third_party/java_deps:protobuf-java",
  ]

  sources = [
    "src/matter/jsontlv/JsonToTlv.kt",
    "src/matter/jsontlv/TlvToJson.kt",
    "src/matter/jsontlv/types.kt",
  ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("json_to_tlv_to_json_test") {
  output_name = "JsonToTlvToJsonTest.jar"

  deps = [
    ":jsontlv",
    "${chip_root}/third_party/java_deps:gson",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:kotlin-test",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/jsontlv/JsonToTlvToJsonTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("onboarding_payload") {
  output_name = "OnboardingPayload.jar"

  deps = [ ":tlv" ]

  sources = [
    "src/matter/onboardingpayload/Base38.kt",
    "src/matter/onboardingpayload/CommissioningFlow.kt",
    "src/matter/onboardingpayload/DiscoveryCapability.kt",
    "src/matter/onboardingpayload/ManualOnboardingPayloadGenerator.kt",
    "src/matter/onboardingpayload/ManualOnboardingPayloadParser.kt",
    "src/matter/onboardingpayload/OnboardingPayload.kt",
    "src/matter/onboardingpayload/OnboardingPayloadParser.kt",
    "src/matter/onboardingpayload/OptionalQRCodeInfo.kt",
    "src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt",
    "src/matter/onboardingpayload/QRCodeOnboardingPayloadGenerator.kt",
    "src/matter/onboardingpayload/QRCodeOnboardingPayloadParser.kt",
    "src/matter/onboardingpayload/VendorId.kt",
    "src/matter/onboardingpayload/Verhoeff.kt",
    "src/matter/onboardingpayload/Verhoeff10.kt",
  ]
}

kotlin_library("onboardingpayload_manual_code_test") {
  output_name = "OnboardingPayloadManualCodeTest.jar"

  deps = [
    ":onboarding_payload",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/onboardingpayload/ManualCodeTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("onboardingpayload_qr_code_test") {
  output_name = "OnboardingPayloadQRCodeTest.jar"

  deps = [
    ":onboarding_payload",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [ "tests/matter/onboardingpayload/QRCodeTest.kt" ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("chipcluster") {
  import(
      "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni")

  output_name = "CHIPClusters.jar"

  deps = [ ":tlv" ]

  sources = structs_sources
  sources += eventstructs_sources

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("chipcluster_test") {
  output_name = "CHIPClustersTest.jar"

  deps = [
    ":chipcluster",
    ":tlv",
    "${chip_root}/third_party/java_deps:junit-4",
    "${chip_root}/third_party/java_deps:truth",
  ]

  sources = [
    "tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt",
    "tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt",
  ]

  kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("kotlin_matter_controller") {
  import(
      "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/files.gni")

  output_name = "KotlinMatterController.jar"

  deps = [ ":java" ]

  sources = [
    "src/matter/controller/CompletionListenerAdapter.kt",
    "src/matter/controller/ControllerParams.kt",
    "src/matter/controller/InteractionClient.kt",
    "src/matter/controller/InvokeCallback.kt",
    "src/matter/controller/InvokeCallbackJni.kt",
    "src/matter/controller/MatterController.kt",
    "src/matter/controller/MatterControllerException.kt",
    "src/matter/controller/MatterControllerImpl.kt",
    "src/matter/controller/Messages.kt",
    "src/matter/controller/OperationalKeyConfig.kt",
    "src/matter/controller/ReportCallback.kt",
    "src/matter/controller/ReportCallbackJni.kt",
    "src/matter/controller/ResubscriptionAttemptCallback.kt",
    "src/matter/controller/SubscriptionEstablishedCallback.kt",
    "src/matter/controller/SubscriptionStates.kt",
    "src/matter/controller/WriteAttributesCallback.kt",
    "src/matter/controller/WriteAttributesCallbackJni.kt",
    "src/matter/controller/model/Paths.kt",
    "src/matter/controller/model/States.kt",
    "src/matter/controller/model/Status.kt",
  ]

  sources += matter_structs_sources
  sources += matter_eventstructs_sources
  sources += matter_clusters_sources

  if (matter_enable_java_compilation) {
    deps += [
      "${chip_root}/third_party/java_deps:kotlin-stdlib",
      "${chip_root}/third_party/java_deps:kotlinx-coroutines-core-jvm",
      "${chip_root}/third_party/java_deps/stub_src",
    ]
  } else {
    deps += [ ":android" ]
  }
}

group("unit_tests") {
  deps = [
    ":chipcluster_test",
    ":json_to_tlv_to_json_test",
    ":onboardingpayload_manual_code_test",
    ":onboardingpayload_qr_code_test",
    ":tlv_read_write_test",
    ":tlv_reader_test",
    ":tlv_writer_test",
  ]
}

android_library("chipclusterID") {
  output_name = "CHIPClusterID.jar"

  sources = [
    "generated/java/chip/devicecontroller/ClusterIDMapping.java",
    "src/chip/devicecontroller/ChipIdLookup.java",
  ]

  javac_flags = [
    "-Xlint:deprecation",
    "-parameters",  # Store infomation about method parameters
  ]
}

android_library("java") {
  output_name = "CHIPController.jar"

  deps = [
    ":chipcluster",
    ":chipclusterID",
    "${chip_root}/third_party/java_deps:annotation",
  ]

  data_deps = [ ":jni" ]

  sources = [
    "src/chip/devicecontroller/AttestationInfo.java",
    "src/chip/devicecontroller/AttestationTrustStoreDelegate.java",
    "src/chip/devicecontroller/CSRInfo.java",
    "src/chip/devicecontroller/ChipClusterException.java",
    "src/chip/devicecontroller/ChipCommandType.java",
    "src/chip/devicecontroller/ChipDeviceController.java",
    "src/chip/devicecontroller/ChipDeviceControllerException.java",
    "src/chip/devicecontroller/CommissioningWindowStatus.java",
    "src/chip/devicecontroller/ConnectionFailureException.java",
    "src/chip/devicecontroller/ControllerParams.java",
    "src/chip/devicecontroller/DeviceAttestation.java",
    "src/chip/devicecontroller/DeviceAttestationDelegate.java",
    "src/chip/devicecontroller/DiscoveredDevice.java",
    "src/chip/devicecontroller/ExtendableInvokeCallback.java",
    "src/chip/devicecontroller/ExtendableInvokeCallbackJni.java",
    "src/chip/devicecontroller/GetConnectedDeviceCallbackJni.java",
    "src/chip/devicecontroller/GroupKeySecurityPolicy.java",
    "src/chip/devicecontroller/ICDCheckInDelegate.java",
    "src/chip/devicecontroller/ICDCheckInDelegateWrapper.java",
    "src/chip/devicecontroller/ICDClientInfo.java",
    "src/chip/devicecontroller/ICDDeviceInfo.java",
    "src/chip/devicecontroller/ICDRegistrationInfo.java",
    "src/chip/devicecontroller/InvokeCallback.java",
    "src/chip/devicecontroller/InvokeCallbackJni.java",
    "src/chip/devicecontroller/KeypairDelegate.java",
    "src/chip/devicecontroller/NetworkCredentials.java",
    "src/chip/devicecontroller/NetworkLocation.java",
    "src/chip/devicecontroller/OTAProviderDelegate.java",
    "src/chip/devicecontroller/OpenCommissioningCallback.java",
    "src/chip/devicecontroller/OperationalKeyConfig.java",
    "src/chip/devicecontroller/PairingHintBitmap.java",
    "src/chip/devicecontroller/PaseVerifierParams.java",
    "src/chip/devicecontroller/ReportCallback.java",
    "src/chip/devicecontroller/ReportCallbackJni.java",
    "src/chip/devicecontroller/ResubscriptionAttemptCallback.java",
    "src/chip/devicecontroller/StatusException.java",
    "src/chip/devicecontroller/SubscriptionEstablishedCallback.java",
    "src/chip/devicecontroller/ThreadScanResult.java",
    "src/chip/devicecontroller/UnpairDeviceCallback.java",
    "src/chip/devicecontroller/WiFiScanResult.java",
    "src/chip/devicecontroller/WriteAttributesCallback.java",
    "src/chip/devicecontroller/WriteAttributesCallbackJni.java",
    "src/chip/devicecontroller/model/AttributeState.java",
    "src/chip/devicecontroller/model/AttributeWriteRequest.java",
    "src/chip/devicecontroller/model/ChipAttributePath.java",
    "src/chip/devicecontroller/model/ChipEventPath.java",
    "src/chip/devicecontroller/model/ChipPathId.java",
    "src/chip/devicecontroller/model/ClusterState.java",
    "src/chip/devicecontroller/model/DataVersionFilter.java",
    "src/chip/devicecontroller/model/EndpointState.java",
    "src/chip/devicecontroller/model/EventState.java",
    "src/chip/devicecontroller/model/InvokeElement.java",
    "src/chip/devicecontroller/model/InvokeResponseData.java",
    "src/chip/devicecontroller/model/NoInvokeResponseData.java",
    "src/chip/devicecontroller/model/NodeState.java",
    "src/chip/devicecontroller/model/Status.java",
  ]

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

  if (matter_enable_java_generated_api) {
    sources += [
      "generated/java/chip/devicecontroller/ChipClusters.java",
      "generated/java/chip/devicecontroller/ChipEventStructs.java",
      "generated/java/chip/devicecontroller/ChipStructs.java",
      "generated/java/chip/devicecontroller/ClusterInfoMapping.java",
      "generated/java/chip/devicecontroller/ClusterReadMapping.java",
      "generated/java/chip/devicecontroller/ClusterWriteMapping.java",
      "src/chip/clusterinfo/ClusterCommandCallback.java",
      "src/chip/clusterinfo/ClusterInfo.java",
      "src/chip/clusterinfo/CommandParameterInfo.java",
      "src/chip/clusterinfo/CommandResponseInfo.java",
      "src/chip/clusterinfo/DelegatedClusterCallback.java",
      "src/chip/clusterinfo/InteractionInfo.java",
      "src/chip/devicecontroller/ChipTLVType.java",
    ]
  }

  if (matter_enable_java_compilation) {
    deps += [
      "${chip_root}/third_party/java_deps:json",
      "${chip_root}/third_party/java_deps/stub_src",
    ]
  } else {
    deps += [ ":android" ]

    data_deps += [ "${chip_root}/build/chip/java:shared_cpplib" ]
  }

  javac_flags = [
    "-Xlint:deprecation",
    "-parameters",  # Store infomation about method parameters
  ]

  # TODO: add classpath support (we likely need to add something like
  #  ..../platforms/android-26/android.jar to access BLE items)
}

if (chip_link_tests) {
  android_library("java_for_test") {
    output_name = "CHIPControllerForTest.jar"

    deps = [ "${chip_root}/third_party/java_deps:annotation" ]

    data_deps = [
      ":jni",
      ":jni_for_test",
    ]

    sources = [
      "src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java",
    ]

    if (matter_enable_java_compilation) {
      deps += [
        "${chip_root}/third_party/java_deps:json",
        "${chip_root}/third_party/java_deps/stub_src",
      ]
    } else {
      deps += [ ":android" ]

      data_deps += [ "${chip_root}/build/chip/java:shared_cpplib" ]
    }

    javac_flags = [ "-Xlint:deprecation" ]

    # TODO: add classpath support (we likely need to add something like
    #  ..../platforms/android-26/android.jar to access BLE items)
  }

  android_library("tests") {
    output_name = "CHIPControllerTests.jar"

    deps = [
      ":java_for_test",
      "${chip_root}/src/messaging/tests/java",
      "${chip_root}/third_party/java_deps:annotation",
    ]

    data_deps = [
      ":jni",
      ":jni_for_test",
      "${chip_root}/src/messaging/tests/java:jni",
    ]

    sources =
        [ "tests/chip/devicecontroller/GetConnectedDeviceCallbackJniTest.java" ]

    if (matter_enable_java_compilation) {
      deps += [
        "${chip_root}/third_party/java_deps:json",
        "${chip_root}/third_party/java_deps/stub_src",
      ]
    } else {
      deps += [ ":android" ]

      data_deps += [ "${chip_root}/build/chip/java:shared_cpplib" ]
    }

    javac_flags = [ "-Xlint:deprecation" ]

    # TODO: add classpath support (we likely need to add something like
    #  ..../platforms/android-26/android.jar to access BLE items)
  }
}

if (!matter_enable_java_compilation) {
  java_prebuilt("android") {
    jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
  }
}
