Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PackageDescription] Add proper resources parameter in PackageDescrip… #2520

Merged
merged 1 commit into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Fixtures/Resources/Simple/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ let package = Package(
targets: [
.target(
name: "SwiftyResource",
__resources: [
resources: [
.copy("foo.txt"),
]
),

.target(
name: "SeaResource",
__resources: [
resources: [
.copy("foo.txt"),
]
),
Expand Down
5 changes: 2 additions & 3 deletions Sources/PackageDescription/Target.swift
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ public final class Target {
path: String? = nil,
exclude: [String] = [],
sources: [String]? = nil,
// FIXME: Underscored until the evolution process is finished.
__resources: [Resource]? = nil,
resources: [Resource]? = nil,
publicHeadersPath: String? = nil,
cSettings: [CSetting]? = nil,
cxxSettings: [CXXSetting]? = nil,
Expand All @@ -364,7 +363,7 @@ public final class Target {
path: path,
exclude: exclude,
sources: sources,
resources: __resources,
resources: resources,
publicHeadersPath: publicHeadersPath,
type: .regular,
cSettings: cSettings,
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageLoadingTests/PD5LoadingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class PackageDescription5LoadingTests: PackageDescriptionLoadingTests {
targets: [
.target(
name: "Foo",
__resources: [
resources: [
.copy("foo.txt"),
.process("bar.txt"),
]
Expand Down