Skip to content

Commit

Permalink
Update Builder code
Browse files Browse the repository at this point in the history
  • Loading branch information
jihoonahn committed Oct 30, 2023
1 parent aac0c74 commit 707a52d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}
Expand Down

0 comments on commit 707a52d

Please sign in to comment.