load("@rules_swift//swift:swift.bzl", "swift_binary")

# Public so the root //:xcodeproj ("forge") can aggregate these targets.
package(default_visibility = ["//visibility:public"])

# One swift_binary per SwiftPM executableTarget in Package.swift.
# (No external dependencies, so no deps to track.)

swift_binary(
    name = "m323",
    srcs = ["Sources/m323/m323.swift"],
)

swift_binary(
    name = "WeDontLikeCharA",
    srcs = ["Sources/WeDontLikeCharA/main.swift"],
)

swift_binary(
    name = "Aufgabe3",
    srcs = ["Sources/Aufgabe3/main.swift"],
)

swift_binary(
    name = "01_MapUebungen",
    srcs = ["Sources/Aufgabe4/01_MapUebungen/main.swift"],
)

swift_binary(
    name = "02_FilterUebungen",
    srcs = ["Sources/Aufgabe4/02_FilterUebungen/main.swift"],
)

swift_binary(
    name = "03_MapUndFilterUebungen",
    srcs = ["Sources/Aufgabe4/03_MapUndFilterUebungen/main.swift"],
)

swift_binary(
    name = "04_FoldLeftUebungen",
    srcs = ["Sources/Aufgabe4/04_FoldLeftUebungen/main.swift"],
)

swift_binary(
    name = "05_FlatMapUebungen",
    srcs = ["Sources/Aufgabe4/05_FlatMapUebungen/main.swift"],
)

swift_binary(
    name = "06_ForComprehensionsUebungen",
    srcs = ["Sources/Aufgabe4/06_ForComprehensionsUebungen/main.swift"],
)

swift_binary(
    name = "LeetCode",
    srcs = [
        "Sources/LeetCode/LeetCode.swift",
        "Sources/LeetCode/main.swift",
    ],
)

# 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 = "m323",
    tags = ["manual"],
    extra_files = [":xcodeproj_extra_files"],
    top_level_targets = [
        "//m323:01_MapUebungen",
        "//m323:02_FilterUebungen",
        "//m323:03_MapUndFilterUebungen",
        "//m323:04_FoldLeftUebungen",
        "//m323:05_FlatMapUebungen",
        "//m323:06_ForComprehensionsUebungen",
        "//m323:Aufgabe3",
        "//m323:LeetCode",
        "//m323:WeDontLikeCharA",
        "//m323:m323",
    ],
)
# END GENERATED XCODEPROJ
