# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//flutter/build/zip_bundle.gni")
import("//flutter/common/config.gni")
import("//flutter/lib/web_ui/flutter_js/sources.gni")
import("//flutter/web_sdk/web_sdk.gni")
import("$dart_src/build/dart/dart_action.gni")

web_ui_sources = exec_script("$dart_src/tools/list_dart_files.py",
                             [
                               "absolute",
                               rebase_path("//flutter/lib/web_ui/lib"),
                             ],
                             "list lines")

web_engine_libraries = [
  ":skwasm_impl_library",
  ":skwasm_stub_library",
  ":web_engine_library",
  ":web_ui_library",
  ":web_ui_ui_web",
  ":web_ui_library_sources",
  ":web_unicode_library",
  ":web_test_fonts_library",
  ":web_locale_keymap_library",
]

group("web_sdk") {
  deps = [
    ":flutter_ddc_modules",
    ":flutter_platform_dills",
    "//flutter/lib/web_ui/flutter_js",
  ]
}

sdk_rewriter("web_ui_library_sources") {
  ui = true
  input_dir = "//flutter/lib/web_ui/lib/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/ui/"

  # exclude everything in the engine directory, it will be a separate internal library
  exclude_pattern = rebase_path("//flutter/lib/web_ui/lib/src")
}

web_ui_ui_web_with_output("web_ui_ui_web") {
  output_dir = "$root_out_dir/flutter_web_sdk/lib/ui_web/"
}

sdk_rewriter("web_engine_library") {
  library_name = "engine"
  api_file = "//flutter/lib/web_ui/lib/src/engine.dart"
  input_dir = "//flutter/lib/web_ui/lib/src/engine/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_engine/"

  # exclude skwasm, it will be a separate internal library
  exclude_pattern = rebase_path("//flutter/lib/web_ui/lib/src/engine/skwasm")
}

sdk_rewriter("skwasm_stub_library") {
  library_name = "skwasm_stub"
  api_file = "//flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_stub.dart"
  input_dir = "//flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_stub/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_skwasm_stub/"
}

sdk_rewriter("skwasm_impl_library") {
  library_name = "skwasm_impl"
  api_file = "//flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl.dart"
  input_dir = "//flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_skwasm_impl/"
}

sdk_rewriter("web_unicode_library") {
  library_name = "web_unicode"
  api_file = "//flutter/third_party/web_unicode/lib/web_unicode.dart"
  input_dir = "//flutter/third_party/web_unicode/lib/web_unicode/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_web_unicode/"
}

sdk_rewriter("web_test_fonts_library") {
  library_name = "web_test_fonts"
  api_file = "//flutter/third_party/web_test_fonts/lib/web_test_fonts.dart"
  input_dir = "//flutter/third_party/web_test_fonts/lib/web_test_fonts/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_web_test_fonts/"
}

sdk_rewriter("web_locale_keymap_library") {
  library_name = "web_locale_keymap"
  api_file =
      "//flutter/third_party/web_locale_keymap/lib/web_locale_keymap.dart"
  input_dir = "//flutter/third_party/web_locale_keymap/lib/web_locale_keymap/"
  output_dir = "$root_out_dir/flutter_web_sdk/lib/_web_locale_keymap/"
}

copy("web_ui_library") {
  sources = [ "//flutter/web_sdk/libraries.json" ]

  outputs = [ "$root_out_dir/flutter_web_sdk/{{source_file_part}}" ]
}

# Compiles a Dart program with dartdevc
#
# Parameters:
#
#   inputs (required): The inputs to dartdevc
#
#   outputs (required): The files generated by dartdevc
#
#   args (required): The arguments to pass to dartdevc
template("_dartdevc") {
  if (flutter_prebuilt_dart_sdk) {
    action(target_name) {
      not_needed(invoker, [ "packages" ])
      deps = web_engine_libraries
      script = "//build/gn_run_binary.py"

      inputs = invoker.inputs
      outputs = invoker.outputs

      pool = "//build/toolchain:toolchain_pool"

      ext = ""
      if (is_win) {
        ext = ".exe"
      }
      dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir)
      dartdevc = rebase_path(
              "$host_prebuilt_dart_sdk/bin/snapshots/dartdevc.dart.snapshot")
      args = [
               dart,
               dartdevc,
             ] + invoker.args
    }
  } else {
    prebuilt_dart_action(target_name) {
      forward_variables_from(invoker, "*")

      deps = web_engine_libraries + [
               "$dart_src:create_sdk",
               "$dart_src/pkg:pkg_files_stamp",
               "$dart_src/utils/ddc:ddc_files_stamp",
               "$dart_src/utils/ddc:ddc_sdk_patch_stamp",
             ]

      script = "$dart_src/pkg/dev_compiler/bin/dartdevc.dart"

      pool = "//build/toolchain:toolchain_pool"
    }
  }
}

# Compiles a Dart SDK with the kernel_worker
#
# Parameters:
#
#   inputs (required): The inputs to the kernel_worker
#
#   outputs (required): The files generated by the kernel_worker
#
#   args (required): The arguments to pass to the kernel_worker
template("_kernel_worker") {
  if (flutter_prebuilt_dart_sdk) {
    action(target_name) {
      deps = web_engine_libraries
      script = "//build/gn_run_binary.py"

      inputs = invoker.inputs
      outputs = invoker.outputs

      pool = "//build/toolchain:toolchain_pool"

      ext = ""
      if (is_win) {
        ext = ".exe"
      }
      dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir)
      kernel_worker = rebase_path(
              "$host_prebuilt_dart_sdk/bin/snapshots/kernel_worker.dart.snapshot")

      args = [
               dart,
               kernel_worker,
             ] + invoker.args
    }
  } else {
    prebuilt_dart_action(target_name) {
      forward_variables_from(invoker, "*")

      deps = web_engine_libraries + [
               "$dart_src:create_sdk",
               "$dart_src/pkg:pkg_files_stamp",
               "$dart_src/utils/ddc:ddc_files_stamp",
               "$dart_src/utils/ddc:ddc_sdk_patch_stamp",
             ]

      script = "$dart_src/utils/bazel/kernel_worker.dart"

      pool = "//build/toolchain:toolchain_pool"
    }
  }
}

template("_compile_platform") {
  assert(defined(invoker.sound_null_safety),
         "sound_null_safety must be defined for $target_name")
  assert(defined(invoker.kernel_target),
         "kernel_target must be defined for $target_name")
  assert(defined(invoker.summary_only),
         "summary_only must be defined for $target_name")
  assert(defined(invoker.output_dill),
         "output_dill must be defined for $target_name")
  _kernel_worker(target_name) {
    inputs = [ "sdk_rewriter.dart" ] + web_ui_sources

    outputs = [ invoker.output_dill ]

    if (invoker.sound_null_safety) {
      args = [ "--sound-null-safety" ]
    } else {
      args = [ "--no-sound-null-safety" ]
    }

    if (invoker.summary_only) {
      args += [ "--summary-only" ]
    } else {
      args += [ "--no-summary-only" ]
    }
    if (defined(invoker.null_environment) && invoker.null_environment) {
      args += [ "--null-environment" ]
    }
    skwasm_library = "dart:_skwasm_stub"
    if (invoker.kernel_target == "dart2wasm") {
      skwasm_library = "dart:_skwasm_impl"
    }

    args += [
      "--target",
      "${invoker.kernel_target}",
      "--packages-file",
      "file:///" + rebase_path(dart_sdk_package_config),
      "--multi-root-scheme",
      "org-dartlang-sdk",
      "--multi-root",
      "file:///" + rebase_path("$root_out_dir/flutter_web_sdk"),
      "--libraries-file",
      "org-dartlang-sdk:///libraries.json",
      "--output",
      rebase_path(invoker.output_dill),
      "--source",
      "dart:core",

      # Additional Flutter web dart libraries
      "--source",
      "dart:ui",
      "--source",
      "dart:ui_web",
      "--source",
      "dart:_engine",
      "--source",
      skwasm_library,
      "--source",
      "dart:_web_unicode",
      "--source",
      "dart:_web_locale_keymap",
    ]
    if (flutter_prebuilt_dart_sdk) {
      args += [
        "--multi-root",
        "file:///" + rebase_path("$host_prebuilt_dart_sdk/.."),
      ]
    } else {
      args += [
        "--multi-root",
        "file:///" + rebase_path("$root_out_dir"),
      ]
    }
  }
}

# Compile the unsound DDC SDK's summary.
_compile_platform("flutter_dartdevc_kernel_sdk_outline_unsound") {
  sound_null_safety = false
  kernel_target = "ddc"
  summary_only = true
  output_dill = "$root_out_dir/flutter_web_sdk/kernel/ddc_outline.dill"
}

# Compile the sound DDC SDK's summary.
_compile_platform("flutter_dartdevc_kernel_sdk_outline_sound") {
  sound_null_safety = true
  kernel_target = "ddc"
  summary_only = true
  output_dill = "$root_out_dir/flutter_web_sdk/kernel/ddc_outline_sound.dill"
}

_compile_platform("flutter_dart2js_kernel_sdk_full_unsound") {
  sound_null_safety = false
  kernel_target = "dart2js"
  summary_only = false
  output_dill =
      "$root_out_dir/flutter_web_sdk/kernel/dart2js_platform_unsound.dill"
  null_environment = true
}

_compile_platform("flutter_dart2js_kernel_sdk_full_sound") {
  sound_null_safety = true
  kernel_target = "dart2js"
  summary_only = false
  output_dill = "$root_out_dir/flutter_web_sdk/kernel/dart2js_platform.dill"
  null_environment = true
}

_compile_platform("flutter_dart2wasm_kernel_sdk_full_sound") {
  sound_null_safety = true
  kernel_target = "dart2wasm"
  summary_only = false
  output_dill = "$root_out_dir/flutter_web_sdk/kernel/dart2wasm_platform.dill"
  null_environment = true
}

group("flutter_platform_dills") {
  public_deps = [
    ":flutter_dart2js_kernel_sdk_full_sound",
    ":flutter_dart2js_kernel_sdk_full_unsound",
    ":flutter_dart2wasm_kernel_sdk_full_sound",
    ":flutter_dartdevc_kernel_sdk_outline_sound",
    ":flutter_dartdevc_kernel_sdk_outline_unsound",

    # TODO(jacksongardner): remove these once they are no longer used by the flutter tool
    # https://github.com/flutter/flutter/issues/113303
    ":flutter_dartdevc_kernel_sdk_outline_sound",
    ":flutter_dartdevc_kernel_sdk_outline_unsound",
  ]
}

template("_compile_ddc_modules") {
  assert(defined(invoker.sound_null_safety),
         "sound_null_safety must be defined for $target_name")
  assert(defined(invoker.use_skia),
         "use_skia must be defined  for $target_name")
  assert(defined(invoker.auto_detect),
         "auto_detect must be defined for $target_name")

  _dartdevc(target_name) {
    inputs = [ "sdk_rewriter.dart" ] + web_ui_sources

    packages = dart_sdk_package_config

    name_suffix = ""
    if (invoker.use_skia) {
      name_suffix += "-canvaskit"
    }
    if (invoker.auto_detect) {
      name_suffix += "-html"
    }
    if (invoker.sound_null_safety) {
      name_suffix += "-sound"
    }

    amd_js_path =
        "$root_out_dir/flutter_web_sdk/kernel/amd${name_suffix}/dart_sdk.js"

    ddc_js_path =
        "$root_out_dir/flutter_web_sdk/kernel/ddc${name_suffix}/dart_sdk.js"

    outputs = [
      amd_js_path,
      amd_js_path + ".map",
      ddc_js_path,
      ddc_js_path + ".map",
    ]

    if (invoker.sound_null_safety) {
      args = [ "--sound-null-safety" ]
    } else {
      args = [ "--no-sound-null-safety" ]
    }

    args += [
      "--compile-sdk",
      "dart:core",

      # Additional Flutter web dart libraries
      "dart:ui",
      "dart:ui_web",
      "dart:_engine",
      "dart:_skwasm_stub",
      "dart:_web_unicode",
      "dart:_web_locale_keymap",
      "--no-summarize",
      "--packages",
      "file:///" + rebase_path(dart_sdk_package_config),
      "--multi-root-scheme",
      "org-dartlang-sdk",
      "--multi-root",
      "file:///" + rebase_path("$root_out_dir/flutter_web_sdk"),
      "--multi-root-output-path",
      rebase_path("$root_out_dir/"),
      "--libraries-file",
      "org-dartlang-sdk:///libraries.json",
      "--inline-source-map",
      "-DFLUTTER_WEB_USE_SKIA=${invoker.use_skia}",
      "-DFLUTTER_WEB_AUTO_DETECT=${invoker.auto_detect}",
      "--modules",
      "amd",
      "-o",
      rebase_path(amd_js_path),
      "--modules",
      "ddc",
      "-o",
      rebase_path(ddc_js_path),
    ]
    if (flutter_prebuilt_dart_sdk) {
      args += [
        "--multi-root",
        "file:///" + rebase_path("$host_prebuilt_dart_sdk/.."),
      ]
    } else {
      args += [
        "--multi-root",
        "file:///" + rebase_path("$root_out_dir"),
      ]
    }
  }
}

# Compiles the unsound html only renderer.
_compile_ddc_modules("flutter_dartdevc_kernel_sdk") {
  sound_null_safety = false
  use_skia = false
  auto_detect = false
}

# Compiles the unsound canvaskit only renderer.
_compile_ddc_modules("flutter_dartdevc_canvaskit_kernel_sdk") {
  sound_null_safety = false
  use_skia = true
  auto_detect = false
}

# Compiles the unsound autodetect renderer.
_compile_ddc_modules("flutter_dartdevc_canvaskit_html_kernel_sdk") {
  sound_null_safety = false
  use_skia = true
  auto_detect = true
}

# Compiles the sound html only renderer.
_compile_ddc_modules("flutter_dartdevc_kernel_sdk_sound") {
  sound_null_safety = true
  use_skia = false
  auto_detect = false
}

# Compiles the sound canvaskit only renderer.
_compile_ddc_modules("flutter_dartdevc_canvaskit_kernel_sdk_sound") {
  sound_null_safety = true
  use_skia = true
  auto_detect = false
}

# Compiles the sound autodetect renderer.
_compile_ddc_modules("flutter_dartdevc_canvaskit_html_kernel_sdk_sound") {
  sound_null_safety = true
  use_skia = true
  auto_detect = true
}

group("flutter_ddc_modules") {
  public_deps = [
    ":flutter_dartdevc_canvaskit_html_kernel_sdk",
    ":flutter_dartdevc_canvaskit_html_kernel_sdk_sound",
    ":flutter_dartdevc_canvaskit_kernel_sdk",
    ":flutter_dartdevc_canvaskit_kernel_sdk_sound",
    ":flutter_dartdevc_kernel_sdk",
    ":flutter_dartdevc_kernel_sdk_sound",
  ]
}

# Archives Flutter Web SDK
if (!is_fuchsia) {
  zip_bundle_from_file("flutter_web_sdk_archive") {
    output = "flutter-web-sdk.zip"
    deps = [
             ":flutter_ddc_modules",
             ":flutter_platform_dills",
           ] + web_engine_libraries

    if (is_wasm) {
      deps += [
        "//flutter/third_party/canvaskit:canvaskit_chromium_group",
        "//flutter/third_party/canvaskit:canvaskit_group",
        "//flutter/third_party/canvaskit:skwasm_group",
      ]
    }
    deps += [ "//flutter/lib/web_ui/flutter_js" ]

    # flutter_ddc_modules
    sources = get_target_outputs(":flutter_dartdevc_kernel_sdk")
    sources += get_target_outputs(":flutter_dartdevc_canvaskit_kernel_sdk")
    sources += get_target_outputs(":flutter_dartdevc_canvaskit_html_kernel_sdk")
    sources += get_target_outputs(":flutter_dartdevc_kernel_sdk_sound")
    sources +=
        get_target_outputs(":flutter_dartdevc_canvaskit_kernel_sdk_sound")
    sources +=
        get_target_outputs(":flutter_dartdevc_canvaskit_html_kernel_sdk_sound")

    # flutter_platform_dills
    sources +=
        get_target_outputs(":flutter_dartdevc_kernel_sdk_outline_unsound")
    sources += get_target_outputs(":flutter_dartdevc_kernel_sdk_outline_sound")
    sources += get_target_outputs(":flutter_dart2js_kernel_sdk_full_unsound")
    sources += get_target_outputs(":flutter_dart2js_kernel_sdk_full_sound")
    sources += get_target_outputs(":flutter_dart2wasm_kernel_sdk_full_sound")
    if (is_wasm) {
      sources += [
        "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.js",
        "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.js.symbols",
        "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.wasm",
        "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.js",
        "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.js.symbols",
        "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.wasm",
        "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.js",
        "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.js.symbols",
        "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.wasm",
        "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.worker.js",
      ]
    }

    # flutter.js full sources
    foreach(source, flutter_js_source_list) {
      sources += [ "$root_out_dir/flutter_web_sdk/flutter_js/$source" ]
    }

    # flutter.js bundled source and sourcemap
    sources += [
      "$root_out_dir/flutter_web_sdk/flutter_js/flutter.js",
      "$root_out_dir/flutter_web_sdk/flutter_js/flutter.js.map",
    ]

    foreach(web_engine_library, web_engine_libraries) {
      sources += get_target_outputs(web_engine_library)
    }

    tmp_files = []
    web_sdk_files =
        filter_include(sources, [ "$root_build_dir/flutter_web_sdk/**" ])
    foreach(source, web_sdk_files) {
      tmp_files += [
        {
          source = rebase_path(source)
          destination = rebase_path(source, "$root_build_dir/flutter_web_sdk")
        },
      ]
    }
    files = tmp_files
  }
}
