Skip to content

Commit

Permalink
Test support for swift package manager
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed May 28, 2024
1 parent 12ee23b commit 0ebd22b
Show file tree
Hide file tree
Showing 14 changed files with 1,850 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/packagedcode/swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
Handle the resolved file and JSON dump of the manifest for Swift packages.
https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html
Run the command below before running the scan:
Run the commands below before running the scan:
``swift package dump-package > Package.swift.json``
``swift package resolve``
"""


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
{
"cLanguageStandard" : null,
"cxxLanguageStandard" : null,
"dependencies" : [
{
"sourceControl" : [
{
"identity" : "turf-swift",
"location" : {
"remote" : [
{
"urlString" : "https://github.com/mapbox/turf-swift.git"
}
]
},
"productFilter" : null,
"requirement" : {
"range" : [
{
"lowerBound" : "2.8.0",
"upperBound" : "3.0.0"
}
]
}
}
]
},
{
"sourceControl" : [
{
"identity" : "mapbox-core-maps-ios",
"location" : {
"remote" : [
{
"urlString" : "https://github.com/mapbox/mapbox-core-maps-ios.git"
}
]
},
"productFilter" : null,
"requirement" : {
"exact" : [
"11.4.0-rc.2"
]
}
}
]
},
{
"sourceControl" : [
{
"identity" : "mapbox-common-ios",
"location" : {
"remote" : [
{
"urlString" : "https://github.com/mapbox/mapbox-common-ios.git"
}
]
},
"productFilter" : null,
"requirement" : {
"exact" : [
"24.4.0-rc.2"
]
}
}
]
}
],
"name" : "MapboxMaps",
"packageKind" : {
"root" : [
"/workspace"
]
},
"pkgConfig" : null,
"platforms" : [
{
"options" : [

],
"platformName" : "ios",
"version" : "12.0"
},
{
"options" : [

],
"platformName" : "macos",
"version" : "10.15"
},
{
"options" : [

],
"platformName" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "MapboxMaps",
"targets" : [
"MapboxMaps"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"providers" : null,
"swiftLanguageVersions" : null,
"targets" : [
{
"dependencies" : [
{
"product" : [
"MapboxCoreMaps",
"mapbox-core-maps-ios",
null,
null
]
},
{
"product" : [
"MapboxCommon",
"mapbox-common-ios",
null,
null
]
},
{
"product" : [
"Turf",
"turf-swift",
null,
null
]
}
],
"exclude" : [
"Info.plist"
],
"name" : "MapboxMaps",
"packageAccess" : true,
"resources" : [
{
"path" : "MapboxMaps.json",
"rule" : {
"copy" : {

}
}
},
{
"path" : "PrivacyInfo.xcprivacy",
"rule" : {
"copy" : {

}
}
}
],
"settings" : [

],
"type" : "regular"
},
{
"dependencies" : [
{
"byName" : [
"MapboxMaps",
null
]
}
],
"exclude" : [

],
"name" : "MapboxMapsTests",
"packageAccess" : true,
"resources" : [
{
"path" : "MigrationGuide/Fixtures/polygon.geojson",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Helpers/MapboxAccessToken",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Resources/empty-style-chicago.json",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testDoesNotShowAttribution().png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testDoesNotShowLogo().png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testDoesNotShowLogoAndAttribution().png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testShowsLogoAndAttribution().png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-100.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-150.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-200.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-250.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-300.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotAttribution-50.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotLogoVisibility.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Snapshot/testSnapshotOverlay.png",
"rule" : {
"copy" : {

}
}
},
{
"path" : "Resources/MapInitOptionsTests.xib",
"rule" : {
"process" : {

}
}
}
],
"settings" : [

],
"type" : "test"
}
],
"toolsVersion" : {
"_version" : "5.9.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Test file for swift package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"pins" : [
{
"identity" : "mapbox-common-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-common-ios.git",
"state" : {
"revision" : "9c04997ed32c5b2506eb704f9f7a16367b5dcc64",
"version" : "24.4.0"
}
},
{
"identity" : "mapbox-core-maps-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-core-maps-ios.git",
"state" : {
"revision" : "c7897628028afb2c008d50c5d5d4054768c99340",
"version" : "11.4.0"
}
},
{
"identity" : "turf-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/turf-swift.git",
"state" : {
"revision" : "213050191cfcb3d5aa76e1fa90c6ff1e182a42ca",
"version" : "2.8.0"
}
}
],
"version" : 2
}
Loading

0 comments on commit 0ebd22b

Please sign in to comment.