From 707a52d5fbe828d7dc234b9da3ca475cdd4b1db9 Mon Sep 17 00:00:00 2001 From: Jihoonahn Date: Mon, 30 Oct 2023 22:12:07 +0900 Subject: [PATCH] Update Builder code --- Package.resolved | 18 ++++++++++++++++++ .../FileElement/FileElementBuilder.swift | 2 ++ .../Component/Package/PackageBuilder.swift | 2 ++ .../Component/Scheme/SchemeBuilder.swift | 2 ++ .../Component/Target/TargetBuilder.swift | 2 ++ 5 files changed, 26 insertions(+) diff --git a/Package.resolved b/Package.resolved index cf27ab74..d1aaf1f8 100644 --- a/Package.resolved +++ b/Package.resolved @@ -8,6 +8,24 @@ "revision" : "1d1e72f2cd90c841d10ee761ec6fd521651d56ba", "version" : "3.28.0" } + }, + { + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-plugin", + "state" : { + "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-docc-symbolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-symbolkit", + "state" : { + "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", + "version" : "1.0.0" + } } ], "version" : 2 diff --git a/ProjectDescriptionHelpers/Component/FileElement/FileElementBuilder.swift b/ProjectDescriptionHelpers/Component/FileElement/FileElementBuilder.swift index d6b443dd..d5da334b 100644 --- a/ProjectDescriptionHelpers/Component/FileElement/FileElementBuilder.swift +++ b/ProjectDescriptionHelpers/Component/FileElement/FileElementBuilder.swift @@ -2,9 +2,11 @@ import ProjectDescription @resultBuilder public struct FileElementBuilder { + @inlinable public static func buildBlock(_ fileElements: FileElement...) -> [FileElement] { fileElements } + @inlinable public static func buildBlock(_ fileElements: [FileElement]) -> [FileElement] { fileElements } diff --git a/ProjectDescriptionHelpers/Component/Package/PackageBuilder.swift b/ProjectDescriptionHelpers/Component/Package/PackageBuilder.swift index 6ca268a5..b6e4d15e 100644 --- a/ProjectDescriptionHelpers/Component/Package/PackageBuilder.swift +++ b/ProjectDescriptionHelpers/Component/Package/PackageBuilder.swift @@ -2,9 +2,11 @@ import ProjectDescription @resultBuilder public struct PackageBuilder { + @inlinable public static func buildBlock(_ packages: Package...) -> [Package] { packages } + @inlinable public static func buildBlock(_ packages: [Package]) -> [Package] { packages } diff --git a/ProjectDescriptionHelpers/Component/Scheme/SchemeBuilder.swift b/ProjectDescriptionHelpers/Component/Scheme/SchemeBuilder.swift index c0092fb8..1f036e62 100644 --- a/ProjectDescriptionHelpers/Component/Scheme/SchemeBuilder.swift +++ b/ProjectDescriptionHelpers/Component/Scheme/SchemeBuilder.swift @@ -2,9 +2,11 @@ import ProjectDescription @resultBuilder public struct SchemeBuilder { + @inlinable public static func buildBlock(_ schemes: Scheme...) -> [Scheme] { schemes } + @inlinable public static func buildBlock(_ schemes: [Scheme]) -> [Scheme] { schemes } diff --git a/ProjectDescriptionHelpers/Component/Target/TargetBuilder.swift b/ProjectDescriptionHelpers/Component/Target/TargetBuilder.swift index 3e13aa74..ac5776b1 100644 --- a/ProjectDescriptionHelpers/Component/Target/TargetBuilder.swift +++ b/ProjectDescriptionHelpers/Component/Target/TargetBuilder.swift @@ -2,9 +2,11 @@ import ProjectDescription @resultBuilder public struct TargetBuilder { + @inlinable public static func buildBlock(_ targets: TargetConvertable...) -> [Target] { targets.map { $0.build() } } + @inlinable public static func buildBlock(_ targets: [TargetConvertable]) -> [Target] { targets.map { $0.build() } }