# 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",
    "AndroidClusterExceptions.cpp",
    "AndroidClusterExceptions.h",
    "AndroidCommissioningWindowOpener.cpp",
    "AndroidCommissioningWindowOpener.h",
    "AndroidConnectionFailureExceptions.cpp",
    "AndroidConnectionFailureExceptions.h",
    "AndroidControllerExceptions.cpp",
    "AndroidControllerExceptions.h",
    "AndroidCurrentFabricRemover.cpp",
    "AndroidCurrentFabricRemover.h",
    "AndroidDeviceControllerWrapper.cpp",
    "AndroidDeviceControllerWrapper.h",
    "AndroidOperationalCredentialsIssuer.cpp",
    "AndroidOperationalCredentialsIssuer.h",
    "AttestationTrustStoreBridge.cpp",
    "AttestationTrustStoreBridge.h",
    "BaseCHIPCluster-JNI.cpp",
    "CHIPAttributeTLVValueDecoder.h",
    "CHIPDeviceController-JNI.cpp",
    "DeviceAttestationDelegateBridge.cpp",
    "DeviceAttestationDelegateBridge.h",
  ]

  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",
    ":tlv",
    "${chip_root}/third_party/java_deps:annotation",
  ]

  sources = [
    "src/matter/controller/CompletionListenerAdapter.kt",
    "src/matter/controller/ControllerParams.kt",
    "src/matter/controller/InteractionClient.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/SubscriptionStates.kt",
    "src/matter/controller/model/Paths.kt",
    "src/matter/controller/model/States.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:json",
      "${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",
    ":jsontlv",
    ":tlv",
    "${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/ConnectionFailureException.java",
    "src/chip/devicecontroller/ControllerParams.java",
    "src/chip/devicecontroller/DeviceAttestationDelegate.java",
    "src/chip/devicecontroller/DiscoveredDevice.java",
    "src/chip/devicecontroller/GetConnectedDeviceCallbackJni.java",
    "src/chip/devicecontroller/GroupKeySecurityPolicy.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/PaseVerifierParams.java",
    "src/chip/devicecontroller/ReportCallback.java",
    "src/chip/devicecontroller/ReportCallbackJni.java",
    "src/chip/devicecontroller/ResubscriptionAttemptCallback.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/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/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"
  }
}
