Skip to content

Commit

Permalink
Update changed so that when you do not use Closure in workspaces or p…
Browse files Browse the repository at this point in the history
…rojects, you can generally receive it in an array
  • Loading branch information
jihoonahn committed Nov 20, 2023
1 parent e588656 commit a7101f6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
20 changes: 19 additions & 1 deletion ProjectDescriptionHelpers/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ProjectDescription
///
/// A project manifest needs to be defined in a `Project.swift` manifest file.
/// Manifests need to import the framework ProjectDescription and TuistUI which contains all
///
///
/// The snippet below shows an example project manifest:
///
/// ```swift
Expand Down Expand Up @@ -54,6 +54,12 @@ public extension Project {
projectModifier.packages = packages()
return self
}
/// project package setting
@inlinable
func package(_ packages: [Package]) -> Self {
projectModifier.packages = packages
return self
}
/// project option setting
@inlinable
func option(options: ProjectDescription.Project.Options) -> Self {
Expand All @@ -66,6 +72,12 @@ public extension Project {
projectModifier.schemes = scheme()
return self
}
/// project scheme setting
@inlinable
func scheme(_ scheme: [ProjectDescription.Scheme]) -> Self {
projectModifier.schemes = scheme
return self
}
/// project setting related settings
@inlinable
func settings(_ setting: Settings?) -> Self {
Expand All @@ -84,6 +96,12 @@ public extension Project {
projectModifier.additionalFiles = additionalFile()
return self
}
/// project additionalFiles setting
@inlinable
func additionalFile(_ additionalFile: [FileElement]) -> Self {
projectModifier.additionalFiles = additionalFile
return self
}
/// project resourceSynthesizers setting
@inlinable
func resourceSynthesizer(_ resourceSynthesizer: [ResourceSynthesizer]) -> Self {
Expand Down
12 changes: 12 additions & 0 deletions ProjectDescriptionHelpers/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ public extension Workspace {
workspaceModifier.schemes = scheme()
return self
}
/// workspace scheme setting
@inlinable
func scheme(_ scheme: [ProjectDescription.Scheme]) -> Self {
workspaceModifier.schemes = scheme
return self
}
/// workspace file Header Template setting
@inlinable
func fileHeaderTemplate(_ fileHeader: FileHeaderTemplate) -> Self {
Expand All @@ -63,6 +69,12 @@ public extension Workspace {
workspaceModifier.additionalFiles = additionalFile()
return self
}
/// workspace additional Files setting
@inlinable
func additionalFile(_ additionalFile: [FileElement]) -> Self {
workspaceModifier.additionalFiles = additionalFile
return self
}
/// workspace generationOption setting
@inlinable
func generationOption(_ option: ProjectDescription.Workspace.GenerationOptions) -> Self {
Expand Down

0 comments on commit a7101f6

Please sign in to comment.