Skip to content

Commit

Permalink
Revert "Tidy up Configuration.swift (tuist#7220)" (tuist#7238)
Browse files Browse the repository at this point in the history
This reverts commit 7f03d54.
  • Loading branch information
fortmarek authored Jan 13, 2025
1 parent ef3a18b commit 960ab07
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Sources/ProjectAutomation/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Foundation

// MARK: - Configuration

// The build Configuration of a target.
// A the build Configuration of a target.

public struct Configuration: Equatable, Codable {
private let settings: SettingsDictionary
public struct Configuration: Equatable, Codable, Sendable {
let settings: SettingsDictionary

public init(
settings: SettingsDictionary
Expand All @@ -16,24 +16,27 @@ public struct Configuration: Equatable, Codable {

// MARK: - BuildConfiguration

public struct BuildConfiguration: Codable, Hashable {
public enum Variant: Codable {
public struct BuildConfiguration: Equatable, Codable, Hashable, Sendable {
public enum Variant: String, Codable, Hashable, Sendable {
case debug
case release
}

private let name: String
private let variant: Variant
public var name: String
public var variant: BuildConfiguration.Variant

public init(name: String, variant: Variant) {
public init(
name: String,
variant: BuildConfiguration.Variant
) {
self.name = name
self.variant = variant
}
}

public typealias SettingsDictionary = [String: SettingValue]

public enum SettingValue: Equatable, Codable {
public enum SettingValue: Equatable, Codable, Sendable {
case string(value: String)
case array(value: [String])

Expand Down

0 comments on commit 960ab07

Please sign in to comment.