chromium/ios/chrome/browser/ui/whats_new/data_source/resources/BUILD.gn

# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chrome_build.gni")
import("//ios/chrome/tools/strings/substitute_strings_identifier.gni")

substitute_strings_identifier("convert_whats_new_items") {
  source = "whats_new_entries.plist"
  output = "$target_gen_dir/whats_new_items.plist"
  headers = [
    "$root_gen_dir/ios/chrome/grit/ios_branded_strings.h",
    "$root_gen_dir/ios/chrome/grit/ios_strings.h",
    "$root_gen_dir/ios/chrome/grit/ios_whats_new_strings.h",
  ]

  deps = [
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/ui/whats_new/strings",
  ]
}

bundle_data("whats_new_entries_plist") {
  public_deps = [ ":convert_whats_new_items" ]
  sources = get_target_outputs(":convert_whats_new_items")

  outputs = [ "{{bundle_resources_dir}}/whats_new_entries.plist" ]
}

substitute_strings_identifier("convert_unit_tests_resources") {
  source = "test/data/whats_new_test.plist"
  output = "$target_gen_dir/whats_new/test/data/whats_new_test.plist"
  headers = [
    "$root_gen_dir/ios/chrome/grit/ios_branded_strings.h",
    "$root_gen_dir/ios/chrome/grit/ios_strings.h",
    "$root_gen_dir/ios/chrome/grit/ios_whats_new_strings.h",
  ]
  deps = [
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/ui/whats_new/strings",
  ]
}

bundle_data("unit_tests_resources") {
  visibility = [ "//ios/chrome/browser/ui/whats_new/data_source:unit_tests" ]
  testonly = true
  public_deps = [ ":convert_unit_tests_resources" ]
  sources = get_target_outputs(":convert_unit_tests_resources")

  outputs =
      [ "{{bundle_resources_dir}}/whats_new/test/data/whats_new_test.plist" ]
}

# Please do not modify this list. The content is updated by script.
# For more info, please see `tools/whats_new`.
screenshots_lists = [
  "m125/PWMWidget.json",
  "m125/PWMWidget_darkmode.json",
  "m125/PinnedTabs.json",
  "m125/PinnedTabs_darkmode.json",
  "m125/InactiveTabs.json",
  "m125/InactiveTabs_darkmode.json",
  "m128/PackageTracking.json",
  "m128/PackageTracking_darkmode.json",
  "m128/PasswordSharing.json",
  "m128/PasswordSharing_darkmode.json",
  "m128/CustomizableOverflowMenu.json",
  "m128/CustomizableOverflowMenu_darkmode.json",
]

bundle_data("screenshots_files") {
  sources = screenshots_lists
  outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}