mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
109 lines
2.5 KiB
Python
109 lines
2.5 KiB
Python
load("//Config:configs.bzl", "app_binary_configs", "library_configs", "pretty", "info_plist_substitutions", "app_info_plist_substitutions", "DEVELOPMENT_LANGUAGE")
|
|
load("//Config:buck_rule_macros.bzl", "apple_lib", "framework_binary_dependencies", "framework_bundle_dependencies")
|
|
|
|
'''apple_asset_catalog(
|
|
name = "ExampleAppAssets",
|
|
visibility = ["//App:"],
|
|
app_icon = "AppIcon",
|
|
dirs = ["Assets.xcassets"],
|
|
)
|
|
|
|
app_tests = [
|
|
":UnitTests",
|
|
":UnitTestsWithHostApp",
|
|
]
|
|
|
|
ui_tests = [
|
|
":XCUITests",
|
|
]'''
|
|
|
|
static_library_dependencies = [
|
|
]
|
|
|
|
framework_dependencies = [
|
|
"//submodules/MtProtoKit:MtProtoKit",
|
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
|
"//submodules/Postbox:Postbox",
|
|
"//submodules/TelegramCore:TelegramCore",
|
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
|
"//submodules/Display:Display",
|
|
"//submodules/TelegramUI:TelegramUI",
|
|
]
|
|
|
|
resource_dependencies = [
|
|
"//submodules/LegacyComponents:LegacyComponentsResources",
|
|
"//submodules/TelegramUI:TelegramUIAssets",
|
|
"//submodules/TelegramUI:TelegramUIResources",
|
|
"//:AppResources",
|
|
"//:AppStringResources",
|
|
"//:Icons",
|
|
"//:AppIcons",
|
|
"//:AdditionalIcons",
|
|
"//:LaunchScreen",
|
|
]
|
|
|
|
build_phase_scripts = [
|
|
]
|
|
|
|
apple_library(
|
|
name = "AppLibrary",
|
|
visibility = [
|
|
"//App:",
|
|
"//App/...",
|
|
],
|
|
configs = library_configs(),
|
|
swift_version = native.read_config("swift", "version"),
|
|
srcs = [
|
|
"Sources/main.m",
|
|
"Sources/Application.swift"
|
|
],
|
|
deps = [
|
|
]
|
|
+ static_library_dependencies
|
|
+ framework_binary_dependencies(framework_dependencies),
|
|
)
|
|
|
|
apple_binary(
|
|
name = "AppBinary",
|
|
visibility = [
|
|
"//App:",
|
|
"//App/...",
|
|
],
|
|
configs = app_binary_configs("Telegram"),
|
|
swift_version = native.read_config("swift", "version"),
|
|
srcs = [
|
|
"SupportFiles/Empty.swift",
|
|
],
|
|
deps = [
|
|
":AppLibrary",
|
|
]
|
|
+ resource_dependencies,
|
|
)
|
|
|
|
xcode_workspace_config(
|
|
name = "workspace",
|
|
workspace_name = "Telegram_Buck",
|
|
src_target = ":Telegram",
|
|
)
|
|
|
|
apple_bundle(
|
|
name = "Telegram",
|
|
visibility = [
|
|
"//App:",
|
|
],
|
|
extension = "app",
|
|
binary = ":AppBinary",
|
|
product_name = "Telegram",
|
|
info_plist = "Info.plist",
|
|
info_plist_substitutions = app_info_plist_substitutions("Telegram"),
|
|
deps = [
|
|
]
|
|
+ framework_bundle_dependencies(framework_dependencies),
|
|
)
|
|
|
|
apple_package(
|
|
name = "AppPackage",
|
|
bundle = ":Telegram",
|
|
)
|
|
|