89 lines
2.3 KiB
Plaintext
89 lines
2.3 KiB
Plaintext
# Copyright (c) 2023 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
import("//brave/common/extensions/api/api_sources.gni")
|
|
import("//brave/components/brave_talk/buildflags/buildflags.gni")
|
|
import("//brave/resources/brave_grit.gni")
|
|
import("//tools/json_schema_compiler/json_features.gni")
|
|
import("//tools/json_schema_compiler/json_schema_api.gni")
|
|
|
|
json_features("api_features") {
|
|
feature_type = "APIFeature"
|
|
method_name = "AddBraveAPIFeatures"
|
|
sources = [ "_api_features.json" ]
|
|
|
|
if (enable_brave_talk) {
|
|
sources += [ "_brave_talk_api_features.json" ]
|
|
}
|
|
}
|
|
|
|
json_features("manifest_features") {
|
|
feature_type = "ManifestFeature"
|
|
method_name = "AddBraveManifestFeatures"
|
|
sources = [ "_manifest_features.json" ]
|
|
}
|
|
|
|
json_features("behavior_features") {
|
|
feature_type = "BehaviorFeature"
|
|
method_name = "AddBraveBehaviorFeatures"
|
|
sources = [ "_behavior_features.json" ]
|
|
}
|
|
|
|
group("extensions_features") {
|
|
public_deps = [
|
|
":api_features",
|
|
":behavior_features",
|
|
":manifest_features",
|
|
":resources",
|
|
]
|
|
}
|
|
|
|
brave_extensions_api_deps = [
|
|
"//chrome/common/extensions/api",
|
|
"//extensions/common/api",
|
|
"//skia",
|
|
]
|
|
|
|
brave_grit("resources") {
|
|
source = "brave_api_resources.grd"
|
|
outputs = [
|
|
"grit/brave_api_resources.h",
|
|
"brave_api_resources.pak",
|
|
]
|
|
}
|
|
|
|
generated_json_strings("generated_api_json_strings") {
|
|
sources = brave_extensions_api_schema_sources +
|
|
brave_extensions_api_uncompiled_sources
|
|
|
|
configs = [ "//build/config:precompiled_headers" ]
|
|
bundle_name = "Brave"
|
|
schema_include_rules = brave_extensions_api_schema_include_rules
|
|
|
|
root_namespace = brave_extensions_api_root_namespace
|
|
deps = brave_extensions_api_deps
|
|
|
|
visibility = [ ":api" ]
|
|
}
|
|
|
|
generated_types("generated_api_types") {
|
|
sources = brave_extensions_api_schema_sources
|
|
configs = [ "//build/config:precompiled_headers" ]
|
|
schema_include_rules = brave_extensions_api_schema_include_rules
|
|
|
|
root_namespace = brave_extensions_api_root_namespace
|
|
deps = brave_extensions_api_deps
|
|
visibility = [ ":api" ]
|
|
}
|
|
|
|
# Public Targets
|
|
|
|
group("api") {
|
|
public_deps = [
|
|
":generated_api_json_strings",
|
|
":generated_api_types",
|
|
]
|
|
}
|