Add rules_xcodeproj targets to each package BUILD plus a root m323 project, with extra_files filegroups so the full source tree shows in Xcode. Ignore Scala/Metals build dirs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
1 KiB
Text
40 lines
1 KiB
Text
load("@rules_swift//swift:swift.bzl", "swift_binary")
|
|
|
|
# Per-directory BUILD: define targets where their sources live, then reference
|
|
# them by label (e.g. //m323/Sources/Aufgabe5:Aufgabe5) from elsewhere to keep the
|
|
# top-level BUILD.bazel uncluttered.
|
|
swift_binary(
|
|
name = "Aufgabe5",
|
|
srcs = ["main.swift"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# BEGIN GENERATED XCODEPROJ
|
|
load("@rules_xcodeproj//xcodeproj:defs.bzl", "top_level_target", "xcodeproj")
|
|
|
|
filegroup(
|
|
name = "xcodeproj_extra_files",
|
|
srcs = glob(
|
|
["**/*"],
|
|
exclude = [
|
|
"BUILD.bazel",
|
|
"BUILD",
|
|
"**/*.xcodeproj/**",
|
|
"**/.*",
|
|
"**/.*/**",
|
|
],
|
|
allow_empty = True,
|
|
),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
xcodeproj(
|
|
name = "xcodeproj",
|
|
project_name = "Aufgabe5",
|
|
tags = ["manual"],
|
|
extra_files = [":xcodeproj_extra_files"],
|
|
top_level_targets = [
|
|
"//m323/Sources/Aufgabe5:Aufgabe5",
|
|
],
|
|
)
|
|
# END GENERATED XCODEPROJ
|