From 40ecea179b9afcc7ee84b2a39de18db3196ffa41 Mon Sep 17 00:00:00 2001 From: Harumi Sagawa Date: Thu, 27 Aug 2026 09:01:34 +0900 Subject: [PATCH] Support Swift Package Manager --- .gitignore | 6 +++++ .../Progress/Elements/Background.swift | 1 + .../Progress/Property.swift | 2 ++ Package.swift | 24 +++++++++++++++++++ README.md | 16 +++++++++++++ source/Progress/Elements/Background.swift | 1 + source/Progress/Property.swift | 2 ++ 7 files changed, 52 insertions(+) create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index 89c1750..ddeb88a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,9 @@ Pods/ # Add this line if you want to avoid checking in source code from Carthage dependencies. Carthage/Checkouts Carthage/Build + +# Swift Package Manager +# +.build/ +.swiftpm/ +Package.resolved diff --git a/GCProgressSample/GradientCircularProgress/Progress/Elements/Background.swift b/GCProgressSample/GradientCircularProgress/Progress/Elements/Background.swift index f846d4f..1581ae5 100644 --- a/GCProgressSample/GradientCircularProgress/Progress/Elements/Background.swift +++ b/GCProgressSample/GradientCircularProgress/Progress/Elements/Background.swift @@ -6,6 +6,7 @@ // Copyright (c) 2015年 keygx. All rights reserved. // +import UIKit struct Background { diff --git a/GCProgressSample/GradientCircularProgress/Progress/Property.swift b/GCProgressSample/GradientCircularProgress/Progress/Property.swift index 1135303..90c7c86 100644 --- a/GCProgressSample/GradientCircularProgress/Progress/Property.swift +++ b/GCProgressSample/GradientCircularProgress/Progress/Property.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015年 keygx. All rights reserved. // +import UIKit + public protocol StyleProperty { // Progress Size var progressSize: CGFloat { get set } diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..3fd30f6 --- /dev/null +++ b/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "GradientCircularProgress", + platforms: [ + .iOS(.v8) + ], + products: [ + .library( + name: "GradientCircularProgress", + targets: ["GradientCircularProgress"] + ) + ], + targets: [ + .target( + name: "GradientCircularProgress", + path: "source", + exclude: ["GradientCircularProgress.h"] + ) + ], + swiftLanguageVersions: [.v5] +) diff --git a/README.md b/README.md index 74dc1d1..5214df1 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,22 @@ github "keygx/GradientCircularProgress" pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress' ``` +### Swift Package Manager + +In Xcode, select `File > Swift Packages > Add Package Dependency...` and enter the repository URL: + +``` +https://github.com/keygx/GradientCircularProgress.git +``` + +Or add it as a dependency in your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/keygx/GradientCircularProgress.git", from: "3.14.0") +] +``` + ### Swift versions support - Swift 5.1, tag "swift5.1" diff --git a/source/Progress/Elements/Background.swift b/source/Progress/Elements/Background.swift index f846d4f..1581ae5 100644 --- a/source/Progress/Elements/Background.swift +++ b/source/Progress/Elements/Background.swift @@ -6,6 +6,7 @@ // Copyright (c) 2015年 keygx. All rights reserved. // +import UIKit struct Background { diff --git a/source/Progress/Property.swift b/source/Progress/Property.swift index 1135303..90c7c86 100644 --- a/source/Progress/Property.swift +++ b/source/Progress/Property.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015年 keygx. All rights reserved. // +import UIKit + public protocol StyleProperty { // Progress Size var progressSize: CGFloat { get set }