{"id":13407099,"url":"https://github.com/ge-org/multiplatform-swiftpackage","last_synced_at":"2026-01-14T03:27:03.373Z","repository":{"id":40385266,"uuid":"303140022","full_name":"ge-org/multiplatform-swiftpackage","owner":"ge-org","description":"Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.","archived":true,"fork":false,"pushed_at":"2023-09-12T17:12:48.000Z","size":129,"stargazers_count":345,"open_issues_count":21,"forks_count":49,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-15T11:41:44.682Z","etag":null,"topics":["gradle","gradle-plugin","ios","kotlin","kotlin-multiplatform","macos","swift","swift-package-manager","tvos","watchos","xcframework"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ge-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-10-11T14:32:49.000Z","updated_at":"2025-07-02T15:01:53.000Z","dependencies_parsed_at":"2024-01-16T15:41:19.421Z","dependency_job_id":"e63df2b5-319e-414f-b989-8bc0eeaee251","html_url":"https://github.com/ge-org/multiplatform-swiftpackage","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ge-org/multiplatform-swiftpackage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ge-org%2Fmultiplatform-swiftpackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ge-org%2Fmultiplatform-swiftpackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ge-org%2Fmultiplatform-swiftpackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ge-org%2Fmultiplatform-swiftpackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ge-org","download_url":"https://codeload.github.com/ge-org/multiplatform-swiftpackage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ge-org%2Fmultiplatform-swiftpackage/sbom","scorecard":{"id":421138,"data":{"date":"2025-08-11","repo":{"name":"github.com/ge-org/multiplatform-swiftpackage","commit":"8d7c25ecc19841d4af515db885ae3426f7f32274"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:14:14.195Z","repository_id":40385266,"created_at":"2025-08-19T01:14:14.196Z","updated_at":"2025-08-19T01:14:14.196Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle","gradle-plugin","ios","kotlin","kotlin-multiplatform","macos","swift","swift-package-manager","tvos","watchos","xcframework"],"created_at":"2024-07-30T20:00:19.804Z","updated_at":"2026-01-14T03:27:03.356Z","avatar_url":"https://github.com/ge-org.png","language":"Kotlin","readme":"# Multiplatform Swift Package\n\n[![Build Status](https://travis-ci.com/ge-org/multiplatform-swiftpackage.svg?branch=master)](https://travis-ci.com/ge-org/multiplatform-swiftpackage)\n\nThis is a Gradle plugin for Kotlin Multiplatform projects that generates an XCFramework for your native Apple targets\nand creates a matching Package.swift file to distribute it as a binary target.\n\nTo distribute the framework a ZIP file containing it will be created and referenced from the Package.\nYou can upload the ZIP file to your package registry so that SPM can download it.\n\n## Prerequisites\n* XCode version 12.0+\n* Gradle version 6.0+\n\n## Installing\nThe plugin is published on Maven central. Add it to the `plugins` block in the Gradle build file.\n\n```kotlin\nplugins {\n  id(\"com.chromaticnoise.multiplatform-swiftpackage\") version \"2.0.3\"\n}\n```\n\n## Execution\nThe plugin adds two Gradle tasks to your project.\n\n* ```./gradlew createSwiftPackage```\n\n    Creates the XCFramework, ZIP file and Package.swift\n\n\n* ```./gradlew createXCFramework```\n\n    Creates only the XCFramework\n\n## Configuration\nGeneration of the Package and XCFramework can be configured using the plugin's DSL.\nAdd the configuration to the Gradle build file.\n\nThis is a complete example of the required configuration. All available options will be explained in the following sections.\n\n```kotlin\nmultiplatformSwiftPackage {\n    swiftToolsVersion(\"5.3\")\n    targetPlatforms {\n      iOS { v(\"13\") }\n    }\n}\n```\n\n### Package Name\nBy default, the name of the Swift package will be the base name of the first framework found in the project.\nHowever, you can declare a different name for the package.\nThis might be useful if your frameworks have different base names, and you want your package to have a common name.\n\n```kotlin\npackageName(\"MyAwesomeKit\")\n```\n\nHint:\nIf the cocoapods plugin is applied the name of the package will default to the value assigned to the `frameworkName` property.\nOtherwise, the value of the `baseName` property of the framework configuration will be used.\n\n### Output Directory\nBy default, the plugin will write all files into the _swiftpackage_ folder in the project directory.\nYou can configure the output folder by providing a File object pointing to it.\n\n```kotlin\noutputDirectory(File(projectDir, \"swiftpackage\"))\n```\n\n### Swift Tools Version\nThe first line of every Package.swift file is a header declaring the Swift tools version  required by the package.\nTo set the version use the following configuration and provide the version your XCode project supports.\n\n```kotlin\nswiftToolsVersion(\"5.3\")\n```\n\n### Distribution Mode\nSwift packages can distribute binary targets either via the local file system or via a remote ZIP file.\nDepending on your requirements (e.g. local development or CI) use one of the following configurations.\n\n#### Local distribution\n```kotlin\ndistributionMode { local() }\n```\n\n#### Remote distribution\nProvide a URL where the ZIP file containing the XCFramework is located.\nThis should point to the root directory and not to the ZIP file itself. \n```kotlin\n// correct\ndistributionMode { remote(\"https://example.com\") }\n\n// wrong\ndistributionMode { remote(\"https://example.com/MyLib.zip\") }\n```\n\n### ZIP File Name\nBy default, the name of the generated ZIP file consists of the package name concatenated with the project's version.\nYou can configure the name by setting a custom value.\nThe `.zip` file extension will be added during the build and should be omitted here.\n```kotlin\nzipFileName(\"MyAwesomeKit\")\n```\n\n### Build Configuration\nApple frameworks can be built with different configurations. By default, these are _release_ and _debug_.\nHowever, you can also create your own configurations.\n\n#### Default\n```kotlin\nbuildConfiguration { release() }\n// or\nbuildConfiguration { debug() }\n```\n\n#### Custom\n```kotlin\nbuildConfiguration { named(\"staging\") }\n```\n\n### Target Platforms\nThe main feature of an XCFramework is packaging multiple architectures for the same platform.\nThis is great since it allows distributing e.g. iOS builds for both the physical device, and the simulator in one package.\n\nSwift packages require declaring the minimum supported version for each platform.\nTherefore, you need to configure both the architectures for each platform and the version.\n\nYou can either declare all target architectures specifically or add all architectures of a platform at once.\n\n```kotlin\ntargetPlatforms {\n  // all iOS targets (== device and simulator) with minimum version 13\n  iOS { v(\"13\") }\n\n  // macOS with minimum version 10.0\n  targets(\"macosX64\") { v(\"10.0\") }\n}\n```\n\n__Note:__\nIf you are using Groovy for the build script the target names must be passed as a list.\n```groovy\ntargetPlatforms {\n  // the catch-all DSL works the same in Groovy and Kotlin\n  iOS { v(\"13\") }\n\n  // however, Groovy requires a list when the targets() DSL is used\n  targets(['macosX64']) { v('10.0') }\n}\n```\n\nAvailable platform shortcuts are:\n- `iOS { v(\"xxx\") }`\n- `tvOS { v(\"xxx\") }`\n- `macOS { v(\"xxx\") }`\n- `watchOS { v(\"xxx\") }`\n\n## Further Reading\nTo learn more about the Swift Package Manager I recommend reading the following resources.\n\n* https://swift.org/package-manager/\n* https://github.com/apple/swift-package-manager\n* https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html\n\n## License\n```text\nCopyright 2020 Georg Dresler\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["Libraries","Kotlin","Plugins"],"sub_categories":["Build \u0026 Development Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fge-org%2Fmultiplatform-swiftpackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fge-org%2Fmultiplatform-swiftpackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fge-org%2Fmultiplatform-swiftpackage/lists"}