Skip to content

Commit e178375

Browse files
authored
Merge branch 'main' into feat/default-configuration-settings
2 parents 690306c + 410925b commit e178375

File tree

7 files changed

+52
-4
lines changed

7 files changed

+52
-4
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@
6060
"contributions": [
6161
"code"
6262
]
63+
},
64+
{
65+
"login": "alexmx",
66+
"name": "Alex Maimescu",
67+
"avatar_url": "https://avatars.githubusercontent.com/u/1628901?v=4",
68+
"profile": "https://github.com/alexmx",
69+
"contributions": [
70+
"code"
71+
]
6372
}
6473
],
6574
"contributorsPerLine": 7,

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tools]
2-
tuist = "4.50.1"
2+
tuist = "4.50.2"
33
swiftlint = "0.54.0"
44
swiftformat = "0.53.3"
55
"git-cliff" = "2.6.1"

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.11.0] - 2025-05-20
9+
### Details
10+
#### Feat
11+
- Add support for defining Info.plist files using a variable by @alexmx in [#184](https://github.com/tuist/XcodeGraph/pull/184)
12+
13+
## New Contributors
14+
* @alexmx made their first contribution in [#184](https://github.com/tuist/XcodeGraph/pull/184)
15+
## [1.10.14] - 2025-05-20
16+
### Details
17+
#### Chore
18+
- Update dependency tuist/filesystem to from: "0.9.2" by @renovate[bot] in [#199](https://github.com/tuist/XcodeGraph/pull/199)
19+
20+
## [1.10.13] - 2025-05-20
21+
### Details
22+
#### Chore
23+
- Update dependency tuist to v4.50.2 by @renovate[bot] in [#198](https://github.com/tuist/XcodeGraph/pull/198)
24+
825
## [1.10.12] - 2025-05-19
926
### Details
1027
#### Chore
@@ -796,6 +813,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
796813

797814
## New Contributors
798815
* @darrarski made their first contribution
816+
[1.11.0]: https://github.com/tuist/XcodeGraph/compare/1.10.14..1.11.0
817+
[1.10.14]: https://github.com/tuist/XcodeGraph/compare/1.10.13..1.10.14
818+
[1.10.13]: https://github.com/tuist/XcodeGraph/compare/1.10.12..1.10.13
799819
[1.10.12]: https://github.com/tuist/XcodeGraph/compare/1.10.11..1.10.12
800820
[1.10.11]: https://github.com/tuist/XcodeGraph/compare/1.10.10..1.10.11
801821
[1.10.10]: https://github.com/tuist/XcodeGraph/compare/1.10.9..1.10.10

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let package = Package(
8282
.package(url: "https://github.com/tuist/Path.git", .upToNextMajor(from: "0.3.8")),
8383
.package(url: "https://github.com/tuist/XcodeProj", .upToNextMajor(from: "9.4.1")),
8484
.package(url: "https://github.com/tuist/Command.git", from: "0.13.0"),
85-
.package(url: "https://github.com/tuist/FileSystem.git", .upToNextMajor(from: "0.9.1")),
85+
.package(url: "https://github.com/tuist/FileSystem.git", .upToNextMajor(from: "0.9.2")),
8686
.package(url: "https://github.com/apple/swift-service-context", .upToNextMajor(from: "1.2.0")),
8787
.package(url: "https://github.com/Kolos65/Mockable.git", .upToNextMajor(from: "0.3.2")),
8888
.package(url: "https://github.com/p-x9/MachOKit", .upToNextMajor(from: "0.32.0")),

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ፨ XcodeGraph
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
3+
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55

66
XcodeGraph is a Swift Package that contains data structures to model an Xcode projects graph.
@@ -61,6 +61,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
6161
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rgnns"><img src="https://avatars.githubusercontent.com/u/811827?v=4?s=100" width="100px;" alt="Gabriel Liévano"/><br /><sub><b>Gabriel Liévano</b></sub></a><br /><a href="https://github.com/tuist/XcodeGraph/commits?author=rgnns" title="Code">💻</a></td>
6262
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fila95"><img src="https://avatars.githubusercontent.com/u/7265334?v=4?s=100" width="100px;" alt="Giovanni Filaferro"/><br /><sub><b>Giovanni Filaferro</b></sub></a><br /><a href="https://github.com/tuist/XcodeGraph/commits?author=fila95" title="Code">💻</a></td>
6363
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Garfeild"><img src="https://avatars.githubusercontent.com/u/12799?v=4?s=100" width="100px;" alt="Anton Kolchunov"/><br /><sub><b>Anton Kolchunov</b></sub></a><br /><a href="https://github.com/tuist/XcodeGraph/commits?author=Garfeild" title="Code">💻</a></td>
64+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alexmx"><img src="https://avatars.githubusercontent.com/u/1628901?v=4?s=100" width="100px;" alt="Alex Maimescu"/><br /><sub><b>Alex Maimescu</b></sub></a><br /><a href="https://github.com/tuist/XcodeGraph/commits?author=alexmx" title="Code">💻</a></td>
6465
</tr>
6566
</tbody>
6667
</table>

Sources/XcodeGraph/Models/Plist.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public enum InfoPlist: Equatable, Codable, Sendable {
103103
// User defined dictionary of keys/values for an info.plist file.
104104
case dictionary([String: Plist.Value], configuration: BuildConfiguration? = nil)
105105

106+
// A user defined xcconfig variable map to .entitlements file
107+
case variable(String, configuration: BuildConfiguration? = nil)
108+
106109
// User defined dictionary of keys/values for an info.plist file extending the default set of keys/values
107110
// for the target type.
108111
case extendingDefault(with: [String: Plist.Value], configuration: BuildConfiguration? = nil)
@@ -123,7 +126,12 @@ public enum InfoPlist: Equatable, Codable, Sendable {
123126

124127
extension InfoPlist: ExpressibleByStringLiteral {
125128
public init(stringLiteral value: String) {
126-
self = .file(path: try! AbsolutePath(validating: value)) // swiftlint:disable:this force_try
129+
let regexPattern = #"^\$\((.+)\)|^\$\{(.+)\}"#
130+
if let _ = value.range(of: regexPattern, options: .regularExpression) {
131+
self = .variable(value)
132+
} else {
133+
self = .file(path: try! AbsolutePath(validating: value)) // swiftlint:disable:this force_try
134+
}
127135
}
128136
}
129137

Tests/XcodeGraphTests/Models/InfoPlistTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,14 @@ final class InfoPlistTests: XCTestCase {
4141
// Then
4242
XCTAssertEqual(subject.path, try AbsolutePath(validating: "/path/Info.list"))
4343
}
44+
45+
func test_expressive_by_string_literal_using_build_variable() {
46+
// Given
47+
let subject1: InfoPlist = "$(CONFIGURATION)/Info.list"
48+
let subject2: InfoPlist = "${CONFIGURATION}/Info.list"
49+
50+
// Then
51+
XCTAssertEqual(subject1, .variable("$(CONFIGURATION)/Info.list", configuration: nil))
52+
XCTAssertEqual(subject2, .variable("${CONFIGURATION}/Info.list", configuration: nil))
53+
}
4454
}

0 commit comments

Comments
 (0)