Skip to content

Commit

Permalink
Support Cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhaiteng committed Apr 1, 2024
1 parent 591b15b commit c00a058
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
51 changes: 51 additions & 0 deletions GradientBuilder.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# Be sure to run `pod lib lint GradientBuilder.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
s.name = 'GradientBuilder'
s.version = '1.1.1'
s.summary = 'A result builder to make create gradient easier'
# s.swift_version:begin
s.swift_version = '5.9.0'
# s.swift_version = '${SWIFT_VERSION}'

# s.platform:begin
s.platform = :ios, '13.0'
s.ios.deployment_target = '13.0'
s.platform = :osx, '10.15'
s.osx.deployment_target = '10.15'

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!

s.description = 'GradientBuilder is written with result builder. It provides a DSL(Domain Specific Language) style to create Gradient. With GradintBuilder, you can create a gradient just like swiftUI View.'

s.homepage = 'https://github.com/chenhaiteng/GradientBuilder'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Chen-Hai Teng' => 'chenhaiteng@gmail.com' }
s.source = { :git => 'https://git@github.com/chenhaiteng/GradientBuilder.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.source_files = 'Sources/GradientBuilder/**/*.swift'

# s.resource_bundles = {
# 'GradientBuilder' => ['GradientBuilder/Assets/*.png']
# }

# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'Cocoa'

# s.dependency 'AFNetworking', '~> 2.3'
# parse and add dependency here
# s.dependency:begin

end
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
For design detail, read [Go through swift result builders](https://chenhaiteng.github.io/swift/2021/08/16/go-through-swift-result-builders.html)

## Installation:

### CocoaPods
GradientBuilder is now available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'GradientBuilder'
```

### Swift Package Manager
GradientBuilder is published with Swift Package Manager, you can get more information at ![Swift Package Manager(GitHub)](https://github.com/apple/swift-package-manager), ![Package Manager(swift.org)](https://swift.org/package-manager/), and ![Swift Packages(Apple)](https://developer.apple.com/documentation/swift_packages)

### Install GradientBuilder Step by Step
#### - Add to Xcode(To use this package in your application):

1. File > Swift Packages > Add Package Dependency...
Expand Down Expand Up @@ -112,4 +121,4 @@ let g = createGradient {
(255, 255, 255, 210) //RGBA8888 format, vlaue from 0 to 255
(.green, 0.7) // Invalid!!! show ambiguous error!!!!
}
```
```

0 comments on commit c00a058

Please sign in to comment.