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

Add SPM Support #36

Merged
merged 2 commits into from
Sep 15, 2021
Merged

Add SPM Support #36

merged 2 commits into from
Sep 15, 2021

Conversation

jdanek4
Copy link
Contributor

@jdanek4 jdanek4 commented Jul 1, 2021

  • Added Swift.package file with necessary configuration
  • Fixed unit tests to work using swift test command

Building:

swift build
[35/35] Build complete!

Testing:

➜  SKTiled git:(spm-support) ✗ swift test 2>&1 | xcbeautify
All tests
Test Suite SKTiledPackageTests.xctest started
ColorTests
    ✔ testColorHexAlphaEquality (0.002 seconds)
    ✔ testColorHexEquality (0.000 seconds)
    ✔ testColorMatchingHelpers (0.000 seconds)
    ✔ testColorParsingExtensions (0.001 seconds)
    ✔ testShortHexStringColorEquality (0.000 seconds)
CompressionTests
    ✔ testGZipCompressedString (0.000 seconds)
    ✔ testZlibCompressedString (0.000 seconds)
CoordinateTests
    ✔ testLayerCoordinateConversion (0.060 seconds)
    ✔ testLayerQueryAllCoordinates (0.023 seconds)
    ✔ testLayerQueryAtCoordinate (0.031 seconds)
    ✔ testTilemapCoordinateConversion (0.036 seconds)
    ✔ testTilemapQueryAtCoordinate (0.030 seconds)
ParserTests
    ✔ testMapExists (0.033 seconds)
    ✔ testMapHasCorrectFlagsSet (0.028 seconds)
    ✔ testMapIsUsingDelegates (0.038 seconds)
PerformanceTests
    ◷ testLargeMapLoadTime measured (0.000 seconds)
    ✔ testLargeMapLoadTime (0.302 seconds)
    ◷ testSmallMapLoadTime measured (0.000 seconds)
    ✔ testSmallMapLoadTime (0.256 seconds)
PropertiesTests
    ✔ testDoubleArrayProperties (0.074 seconds)
    ✔ testGetTilesWithProperty (0.034 seconds)
    ✔ testIntArrayProperties (0.043 seconds)
    ✔ testPropertiesAreIgnored (0.074 seconds)
    ✔ testStringArrayProperties (0.034 seconds)
QueryTests
    ✔ testQueryFunctions (0.036 seconds)
TilemapTests
    ✔ testBasicMapAttributes (0.043 seconds)
    ✔ testLayerQueryObjectProxies (0.042 seconds)
    ✔ testMapQueryObjectProxies (0.046 seconds)
    ✔ testQueryTilesOfType (0.038 seconds)
TilesetTests
    ✔ testContainsMethods (0.038 seconds)
    ✔ testGlobalIDQuery (0.043 seconds)
    ✔ testTilesetExists (0.046 seconds)
    ✔ testTilesetProperties (0.050 seconds)
Tests Passed: 0 failed, 31 total (1.484 seconds)

Integration:

Xcode:
- File -> Swift Package -> Add package dependency

Another Swift Package:
- Add line to `Package.swift`
  - `.package(url: "https://github.com/jdanek4/SKTiled", .branch("spm-support"))`

jdanek4 added 2 commits July 1, 2021 17:12
- Added Swift.package file with necessary configuration
- Fixed unit tests to work using `swift test` command
@mfessenden
Copy link
Owner

This looks great! Thanks for adding the tests as well.

I'll merge this, though I've been putting off support for SPM because the DebugDrawOptions optionset is defined in an Objective-C header, which SPM doesn't (yet) support.

@mfessenden mfessenden merged commit 212f76e into mfessenden:master Sep 15, 2021
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.

2 participants