# 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_root}/config/android_abi.gni")
import("${chip_root}/build/chip/java/rules.gni")
import("${chip_root}/build/chip/tools.gni")

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

  sources = [
    "${chip_root}/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h",
    "include/account-login/AccountLoginManager.cpp",
    "include/account-login/AccountLoginManager.h",
    "include/application-basic/ApplicationBasicManager.cpp",
    "include/application-basic/ApplicationBasicManager.h",
    "include/audio-output/AudioOutputManager.cpp",
    "include/audio-output/AudioOutputManager.h",
    "include/cluster-init.cpp",
    "include/content-control/ContentController.cpp",
    "include/content-control/ContentController.h",
    "include/content-launcher/AppContentLauncherManager.cpp",
    "include/content-launcher/AppContentLauncherManager.h",
    "include/media-playback/AppMediaPlaybackManager.cpp",
    "include/media-playback/AppMediaPlaybackManager.h",
    "include/target-navigator/TargetNavigatorManager.cpp",
    "include/target-navigator/TargetNavigatorManager.h",
    "java/AppImpl.cpp",
    "java/AppImpl.h",
    "java/AppPlatform-JNI.cpp",
    "java/AppPlatformShellCommands-JNI.cpp",
    "java/AppPlatformShellCommands-JNI.h",
    "java/ChannelManager.cpp",
    "java/ChannelManager.h",
    "java/ClusterChangeAttribute.cpp",
    "java/ContentAppAttributeDelegate.cpp",
    "java/ContentAppAttributeDelegate.h",
    "java/ContentAppCommandDelegate.cpp",
    "java/ContentAppCommandDelegate.h",
    "java/ContentLauncherManager.cpp",
    "java/ContentLauncherManager.h",
    "java/DeviceCallbacks.cpp",
    "java/DeviceCallbacks.h",
    "java/JNIDACProvider.cpp",
    "java/JNIDACProvider.h",
    "java/KeypadInputManager.cpp",
    "java/KeypadInputManager.h",
    "java/LevelManager.cpp",
    "java/LevelManager.h",
    "java/LowPowerManager.cpp",
    "java/LowPowerManager.h",
    "java/MediaInputManager.cpp",
    "java/MediaInputManager.h",
    "java/MediaPlaybackManager.cpp",
    "java/MediaPlaybackManager.h",
    "java/MessagesManager.cpp",
    "java/MessagesManager.h",
    "java/MyUserPrompter-JNI.cpp",
    "java/MyUserPrompter-JNI.h",
    "java/MyUserPrompterResolver-JNI.cpp",
    "java/MyUserPrompterResolver-JNI.h",
    "java/OnOffManager.cpp",
    "java/OnOffManager.h",
    "java/TVApp-JNI.cpp",
    "java/WakeOnLanManager.cpp",
    "java/WakeOnLanManager.h",
    "java/application-launcher/ApplicationLauncherManager.cpp",
    "java/application-launcher/ApplicationLauncherManager.h",
  ]

  deps = [
    "${chip_root}/examples/platform/linux:commissioner-main",
    "${chip_root}/examples/tv-app/tv-common",
    "${chip_root}/src/app/server/java:jni",
    "${chip_root}/src/lib",
    "${chip_root}/src/lib/support/jsontlv",
    "${chip_root}/src/platform/logging:default",
    "${chip_root}/third_party/inipp",
  ]

  cflags = [ "-Wconversion" ]

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

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

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

  deps = [
    ":android",
    "${chip_root}/third_party/android_deps:annotation",
  ]

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

  sources = [
    "java/src/com/matter/tv/server/tvapp/AppPlatform.java",
    "java/src/com/matter/tv/server/tvapp/AppPlatformShellCommands.java",
    "java/src/com/matter/tv/server/tvapp/Application.java",
    "java/src/com/matter/tv/server/tvapp/ApplicationLauncherManager.java",
    "java/src/com/matter/tv/server/tvapp/ChannelInfo.java",
    "java/src/com/matter/tv/server/tvapp/ChannelLineupInfo.java",
    "java/src/com/matter/tv/server/tvapp/ChannelManager.java",
    "java/src/com/matter/tv/server/tvapp/ChannelManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/ChannelProgramInfo.java",
    "java/src/com/matter/tv/server/tvapp/ChannelProgramResponse.java",
    "java/src/com/matter/tv/server/tvapp/Clusters.java",
    "java/src/com/matter/tv/server/tvapp/ContentAppEndpointManager.java",
    "java/src/com/matter/tv/server/tvapp/ContentAppSupportedCluster.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchBrandingInformation.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchEntry.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchManager.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchResponse.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchSearchParameter.java",
    "java/src/com/matter/tv/server/tvapp/ContentLaunchSearchParameterType.java",
    "java/src/com/matter/tv/server/tvapp/DACProvider.java",
    "java/src/com/matter/tv/server/tvapp/DACProviderStub.java",
    "java/src/com/matter/tv/server/tvapp/DeviceEventProvider.java",
    "java/src/com/matter/tv/server/tvapp/KeypadInputManager.java",
    "java/src/com/matter/tv/server/tvapp/KeypadInputManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/LauncherResponse.java",
    "java/src/com/matter/tv/server/tvapp/LevelManager.java",
    "java/src/com/matter/tv/server/tvapp/LevelManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/LowPowerManager.java",
    "java/src/com/matter/tv/server/tvapp/LowPowerManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/MediaInputInfo.java",
    "java/src/com/matter/tv/server/tvapp/MediaInputManager.java",
    "java/src/com/matter/tv/server/tvapp/MediaInputManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/MediaPlaybackManager.java",
    "java/src/com/matter/tv/server/tvapp/MediaPlaybackManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/MediaPlaybackPosition.java",
    "java/src/com/matter/tv/server/tvapp/MediaTrack.java",
    "java/src/com/matter/tv/server/tvapp/Message.java",
    "java/src/com/matter/tv/server/tvapp/MessageResponseOption.java",
    "java/src/com/matter/tv/server/tvapp/MessagesManager.java",
    "java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/OnOffManager.java",
    "java/src/com/matter/tv/server/tvapp/OnOffManagerStub.java",
    "java/src/com/matter/tv/server/tvapp/TvApp.java",
    "java/src/com/matter/tv/server/tvapp/TvAppCallback.java",
    "java/src/com/matter/tv/server/tvapp/UserPrompter.java",
    "java/src/com/matter/tv/server/tvapp/UserPrompterResolver.java",
    "java/src/com/matter/tv/server/tvapp/WakeOnLanManager.java",
    "java/src/com/matter/tv/server/tvapp/WakeOnLanManagerStub.java",
  ]

  javac_flags = [ "-Xlint:deprecation" ]

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

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

group("default") {
  deps = [
    ":android",
    ":java",
    ":jni",
    "${chip_root}/src/app/server/java",
    "${chip_root}/src/controller/java:onboarding_payload",
    "${chip_root}/src/platform/android:java",
  ]
}
