Skip to content

Commit

Permalink
Merge pull request #24 from mrackwitz/subspecs
Browse files Browse the repository at this point in the history
Subspecs
  • Loading branch information
mrackwitz committed Feb 26, 2014
2 parents bd872e6 + 4ee1b20 commit 7af8881
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 5 deletions.
64 changes: 61 additions & 3 deletions MRProgress.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,67 @@ Pod::Spec.new do |s|
s.author = { 'Marius Rackwitz' => 'git@mariusrackwitz.de' }
s.license = 'MIT License'
s.source = { :git => 'https://github.com/mrackwitz/MRProgress.git', :tag => s.version.to_s }
s.source_files = 'src/**/*.{h,m}'
s.prefix_header_file = 'src/MRProgress.h'
s.platform = :ios, '7.0'
s.requires_arc = true
s.ios.frameworks = %w{UIKit QuartzCore CoreGraphics Accelerate}

s.subspec 'Blur' do |subs|
subs.source_files = 'src/Blur/*.{h,m}'
subs.dependency 'MRProgress/Helper'
subs.ios.frameworks = %w{UIKit QuartzCore CoreGraphics Accelerate}
end

s.subspec 'ActivityIndicator' do |subs|
subs.source_files = 'src/Components/MRActivityIndicatorView.{h,m}'
subs.dependency 'MRProgress/Stopable'
subs.ios.frameworks = %w{UIKit QuartzCore CoreGraphics}
end

s.subspec 'Circular' do |subs|
subs.source_files = 'src/Components/MRCircularProgressView.{h,m}'
subs.dependency 'MRProgress/Stopable'
subs.dependency 'MRProgress/Helper'
subs.ios.frameworks = %w{UIKit QuartzCore}
end

s.subspec 'Icons' do |subs|
subs.source_files = 'src/Components/MRIconView.{h,m}'
subs.ios.frameworks = %w{UIKit QuartzCore}
end

s.subspec 'NavigationBarProgress' do |subs|
subs.source_files = 'src/Components/MRNavigationBarProgressView.{h,m}'
subs.dependency 'MRProgress/MessageInterceptor'
subs.ios.frameworks = %w{UIKit}
end

s.subspec 'Overlay' do |subs|
subs.source_files = 'src/Components/MRProgressOverlayView.{h,m}'
subs.dependency 'MRProgress/ActivityIndicator'
subs.dependency 'MRProgress/Circular'
subs.dependency 'MRProgress/Icons'
subs.dependency 'MRProgress/Blur'
subs.dependency 'MRProgress/Helper'
subs.ios.frameworks = %w{UIKit QuartzCore CoreGraphics}
end

# "Public" helper subspecs - you can rely on these
s.subspec 'MessageInterceptor' do |subs|
subs.source_files = 'src/Utils/MRMessageInterceptor.{h,m}'
end

s.subspec 'WeakProxy' do |subs|
subs.source_files = 'src/Utils/MRWeakProxy.{h,m}'
end

# "Private" helper subspecs - do not depend on these
s.subspec 'Stopable' do |subs|
subs.source_files = 'src/Components/{MRStopableView,MRStopButton}.{h,m}'
subs.ios.frameworks = %w{UIKit QuartzCore}
subs.dependency 'MRProgress/Helper'
end

s.subspec 'Helper' do |subs|
subs.source_files = 'src/Utils/MRProgressHelper.h'
subs.ios.frameworks = %w{UIKit QuartzCore}
end
end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COCOAPODS: 0.27.1
COCOAPODS: 0.29.0
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The provided Example app demonstrates how they can be used.

[CocoaPods](http://www.cocoapods.org) is the recommended way to add MRProgress to your project.

1. Add a pod entry for MRProgress to your *Podfile* `pod 'MRProgress', '~> 0.3'`.
1. Add a pod entry for MRProgress to your *Podfile* `pod 'MRProgress'.
2. Install the pod(s) by running `pod install`.
3. Include MRProgress wherever you need it with `#import "MRProgress.h"`.

Expand All @@ -104,6 +104,36 @@ The provided Example app demonstrates how they can be used.
4. `import <MRProgress/MRProgress.h>` whereever you want to use the components. You could add it to your Prefix header file, if you want.


### Cocoapods - Subspecs

The library is cut in small subspecs, so that you can just depend on selected components. See the following dependency tree:

```
─┬─MRProgress/
├───Blur
├───ActivityIndicator
├───Circular
├───Icons
├─┬─NavigationBarProgress
│ └───MessageInterceptor
├─┬─Overlay
│ ├───ActivityIndicator
│ ├───Circular
│ ├───Icons
│ └───Blur
├───MessageInterceptor
└───WeakProxy
```



## Requirements

Expand Down

0 comments on commit 7af8881

Please sign in to comment.