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

Adds Swift version support #4

Merged
merged 5 commits into from
Aug 6, 2024
Merged

Adds Swift version support #4

merged 5 commits into from
Aug 6, 2024

Conversation

antoniostrijdom
Copy link
Contributor

@antoniostrijdom antoniostrijdom commented Aug 5, 2024

This PR adds the ability to specify the Swift versions your package supports as well as the ability to specify which swift-tools-version to use. These properties are entirely optional.

In order to specify which versions of Swift your module supports, specify it in the new swiftLanguageVersions array in your package definition:

{
  "name": "Example",
  ...
  "swiftLanguageVersions": [
    "5.10",
    "6.0"
  ],
  ...
}

this will produce a package that supports Swift 5.10 and Swift 6:

swiftLanguageVersions: [
    .version("5.10"),
    .version("6.0"),
]

In order to specify which swift-tools-version to use, specify it in the new swiftToolsVersion property in your package definition:

{
  "name": "Example",
  ...
  "swiftToolsVersion": "5.10",
  ...
}

this will product a package that uses 5.10 as the swift-tools-version:

// swift-tools-version: 5.10

Copy link
Member

@albertodebortoli albertodebortoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of isToolsVersion I would prefer a dedicated key in the spec. What do you think?

Minor: use 2 spaces in the jsons for consistency.

@albertodebortoli albertodebortoli merged commit c08a0b6 into justeattakeaway:main Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants