pod-builder 1.9.4 → 2.0.0.beta.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +9 -0
  3. data/README.md +50 -13
  4. data/exe/pod_builder +39 -28
  5. data/lib/pod_builder/analyze.rb +32 -7
  6. data/lib/pod_builder/analyzer.rb +16 -0
  7. data/lib/pod_builder/command/build.rb +44 -174
  8. data/lib/pod_builder/command/build_all.rb +2 -2
  9. data/lib/pod_builder/command/clean.rb +34 -55
  10. data/lib/pod_builder/command/clear_lldbinit.rb +7 -3
  11. data/lib/pod_builder/command/deintegrate.rb +29 -7
  12. data/lib/pod_builder/command/generate_lfs.rb +3 -3
  13. data/lib/pod_builder/command/generate_podspec.rb +3 -2
  14. data/lib/pod_builder/command/info.rb +1 -1
  15. data/lib/pod_builder/command/init.rb +37 -14
  16. data/lib/pod_builder/command/install_sources.rb +21 -14
  17. data/lib/pod_builder/command/none.rb +2 -2
  18. data/lib/pod_builder/command/restore_all.rb +4 -4
  19. data/lib/pod_builder/command/switch.rb +137 -95
  20. data/lib/pod_builder/command/sync_podfile.rb +5 -3
  21. data/lib/pod_builder/command/update.rb +5 -6
  22. data/lib/pod_builder/command/update_lldbinit.rb +11 -9
  23. data/lib/pod_builder/configuration.rb +88 -13
  24. data/lib/pod_builder/core.rb +95 -14
  25. data/lib/pod_builder/info.rb +32 -98
  26. data/lib/pod_builder/install.rb +255 -195
  27. data/lib/pod_builder/licenses.rb +4 -4
  28. data/lib/pod_builder/podfile.rb +300 -73
  29. data/lib/pod_builder/podfile/post_actions.rb +9 -15
  30. data/lib/pod_builder/podfile_cp.rb +93 -0
  31. data/lib/pod_builder/podfile_item.rb +181 -82
  32. data/lib/pod_builder/podspec.rb +144 -135
  33. data/lib/pod_builder/rome/post_install.rb +240 -0
  34. data/lib/pod_builder/rome/pre_install.rb +6 -0
  35. data/lib/pod_builder/templates/build_podfile.template +3 -3
  36. data/lib/pod_builder/version.rb +1 -1
  37. data/pod-builder.gemspec +5 -5
  38. metadata +23 -76
  39. data/Example/Frameworks/PodBuilder.json +0 -32
  40. data/Example/PodBuilderExample.xcodeproj/project.pbxproj +0 -416
  41. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  42. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  43. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcuserdata/tomas.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  44. data/Example/PodBuilderExample.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  45. data/Example/PodBuilderExample.xcworkspace/contents.xcworkspacedata +0 -10
  46. data/Example/PodBuilderExample/AppDelegate.swift +0 -47
  47. data/Example/PodBuilderExample/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  48. data/Example/PodBuilderExample/Assets.xcassets/Contents.json +0 -6
  49. data/Example/PodBuilderExample/Base.lproj/LaunchScreen.storyboard +0 -25
  50. data/Example/PodBuilderExample/Base.lproj/Main.storyboard +0 -24
  51. data/Example/PodBuilderExample/Info.plist +0 -45
  52. data/Example/PodBuilderExample/ViewController.swift +0 -25
  53. data/Example/Podfile +0 -8
  54. data/Example/Podfile.lock +0 -16
  55. data/Example/Pods/Alamofire/LICENSE +0 -19
  56. data/Example/Pods/Alamofire/README.md +0 -242
  57. data/Example/Pods/Alamofire/Source/AFError.swift +0 -460
  58. data/Example/Pods/Alamofire/Source/Alamofire.swift +0 -465
  59. data/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +0 -37
  60. data/Example/Pods/Alamofire/Source/MultipartFormData.swift +0 -580
  61. data/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +0 -233
  62. data/Example/Pods/Alamofire/Source/Notifications.swift +0 -55
  63. data/Example/Pods/Alamofire/Source/ParameterEncoding.swift +0 -483
  64. data/Example/Pods/Alamofire/Source/Request.swift +0 -654
  65. data/Example/Pods/Alamofire/Source/Response.swift +0 -567
  66. data/Example/Pods/Alamofire/Source/ResponseSerialization.swift +0 -715
  67. data/Example/Pods/Alamofire/Source/Result.swift +0 -300
  68. data/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +0 -307
  69. data/Example/Pods/Alamofire/Source/SessionDelegate.swift +0 -725
  70. data/Example/Pods/Alamofire/Source/SessionManager.swift +0 -896
  71. data/Example/Pods/Alamofire/Source/TaskDelegate.swift +0 -466
  72. data/Example/Pods/Alamofire/Source/Timeline.swift +0 -136
  73. data/Example/Pods/Alamofire/Source/Validation.swift +0 -315
  74. data/Example/Pods/Manifest.lock +0 -16
  75. data/Example/Pods/Pods.xcodeproj/project.pbxproj +0 -673
  76. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Alamofire.xcscheme +0 -60
  77. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Pods-PodBuilderExample.xcscheme +0 -60
  78. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +0 -21
  79. data/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +0 -5
  80. data/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +0 -12
  81. data/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +0 -16
  82. data/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap +0 -6
  83. data/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +0 -9
  84. data/Example/Pods/Target Support Files/Alamofire/Info.plist +0 -26
  85. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Info.plist +0 -26
  86. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.markdown +0 -26
  87. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.plist +0 -58
  88. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-dummy.m +0 -5
  89. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-frameworks.sh +0 -153
  90. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-resources.sh +0 -118
  91. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-umbrella.h +0 -16
  92. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.debug.xcconfig +0 -11
  93. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.modulemap +0 -6
  94. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.release.xcconfig +0 -11
  95. data/lib/pod_builder/cocoapods/specification.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b68e52a5461141c3370ea7dc00ddb205846f9ed7e2f2efce5a026e412b3b0d17
4
- data.tar.gz: 800fd0c1940127ac4805a72cacd31f8311c146fe42a45596a4c9400e20764e37
3
+ metadata.gz: 16bb73e4ce3559e587cb45b0b80e7e92b1b904a016a09ef8769bdc5f36bd3c3b
4
+ data.tar.gz: 1b7990f9999ff210171bc012d2ae3d72b96b2cce7fd273906ed97351dcf74694
5
5
  SHA512:
6
- metadata.gz: a1edc1b03e0f53c84ca624586c8d80631f22639e158888ebedf650c2224658a8f9d90f53bd1225a29b970293d5672ec906121c95c654495d1eba0039e226f98c
7
- data.tar.gz: 4e16e658df48c264b84b4cf4db2fa44191aa929b4de1106d6bc84cb1f07227d9338c468339f6a28ce21b4a8757e191fcdb3a532f53cdcd04a2ed76c6b9b1565f
6
+ metadata.gz: 7344c45e940ba2d2ff9b9c4cef8ca43fc49e07151b17124fceb1cccad2ce7cfaafcfe20e6de71cd58792db839a4c28ea61c9928eb5511b429deda37166df0824
7
+ data.tar.gz: 92b7caed18491251d38ed4f90325b968e3fb5d6dced12b98d34a96522904472231f61a31e471c3ed095863a8d489074de6ef053bcdfeb5a865a103dcf635e349
data/.gitignore CHANGED
@@ -8,3 +8,12 @@
8
8
  /tmp/
9
9
  Gemfile.lock
10
10
  .vscode/
11
+ .DS_Store
12
+ Example/Pods
13
+ Example/PodBuilder/Prebuilt
14
+
15
+ Example/PodBuilder/dSYM
16
+
17
+ Example/PodBuilderExample.xcodeproj/xcuserdata/*.xcuserdatad
18
+ Example/PodBuilderExample.xcworkspace/xcuserdata
19
+ Example/Pods
data/README.md CHANGED
@@ -12,18 +12,38 @@ Unless you're using a Ruby version manager you should generally install using `s
12
12
 
13
13
  $ sudo gem install pod-builder
14
14
 
15
+ # Quick start
16
+
15
17
  You can the initialize your project to use the tool using the `init` command
16
18
 
17
19
  $ cd path-to-your-repo;
18
20
  $ pod_builder init
19
21
 
20
- This will add a _Frameworks_ folder which will contain all files needed and generated by the PodBuilder.
22
+ This will add a _PodBuilder_ folder which will contain all files needed and generated by the PodBuilder.
23
+
24
+ To prebuild all dependencies run
25
+
26
+ $ pod_builder build_all
27
+
28
+ To prebuild just one or more specific dependencies run
29
+
30
+ $ pod_builder build Pod1 Pod2
31
+
32
+ This will generate the pod frameworks which can be committed to your repo for a much faster compilation.
33
+
34
+ Should PodBuilder not work the way you expect you can get rid of it by running
35
+
36
+ $ pod_builder deintegrate
37
+
38
+ Which will restore all changes that PodBUilder applied to the project (the PodBuilder folder and the changes to the Podfile).
39
+
40
+ # Usage
21
41
 
22
42
  ## Podfile
23
43
 
24
44
  The workflow is very similar to the one you're used to with CocoaPods. The most significant difference is that PodBuilder relies on 3 Podfiles:
25
45
 
26
- ### 1. Frameworks/Podfile (aka PodBuilder-Podfile)
46
+ ### 1. PodBuilder/Podfile (aka PodBuilder-Podfile)
27
47
 
28
48
  This is your original Podfile and remains your **master Podfile** that you will update as needed. It is used by PodBuilder to determine which versions and dependencies need to be compiled when prebuilding.
29
49
 
@@ -31,7 +51,7 @@ This is your original Podfile and remains your **master Podfile** that you will
31
51
 
32
52
  Based on the one above but will replace precompiled frameworks with references to the local PodBuilder podspec. **It is autogenerated and shouldn't be manually changed**
33
53
 
34
- ### 3. Frameworks/Podfile.restore (aka Restore-Podfile)
54
+ ### 3. PodBuilder/Podfile.restore (aka Restore-Podfile)
35
55
 
36
56
  This acts as a sort of lockfile and reflects the current state of what is installed in the application, pinning pods to a particular tag or commit. This will be particularly useful until Swift reaches ABI stability, because when you check out an old revision of your code you won't be able to get your project running unless the Swift frameworks were compiled with a same version of Xcode you're currently using. This file is used internally by PodBuilder and shouldn't be manually changed. **It is autogenerated and shouldn't be manually changed**
37
57
 
@@ -48,7 +68,7 @@ Podbuilder comes with a set of commands:
48
68
  - `install_sources`: installs sources of pods to debug into prebuild frameworks
49
69
  - `switch`: switch between prebuilt, development or standard pod in the Application-Podfile
50
70
  - `clean`: removes unused prebuilt frameworks, dSYMs and source files added by install_sources
51
- - `sync_podfile`: updates the Application with all pods declared in the PodBuilder-Podfile file
71
+ - `sync_podfile`: updates the Application-Podfile with all pods declared in the PodBuilder-Podfile file
52
72
  - `info`: outputs json-formatted information reflecting the current status of prebuilt pods
53
73
 
54
74
  Commands can be run from anywhere in your project's repo that is **required to be under git**.
@@ -59,8 +79,8 @@ This will sets up a project to use PodBuilder.
59
79
 
60
80
  The following will happen:
61
81
 
62
- - Create a _Frameworks_ folder in your repo's root.
63
- - Copy your original Podfile to _Frameworks/Podfile_ (PodBuilder-Podfile)
82
+ - Create a _PodBuilder_ folder in your repo's root.
83
+ - Copy your original Podfile to _PodBuilder/Podfile_ (PodBuilder-Podfile)
64
84
  - Add an initially empty _PodBuilder.json_ configuration file
65
85
  - Modify the original Podfile (Application-Podfile) with some minor customizations
66
86
  - Create/Update your Gemfile adding the `gem 'pod-builder'` entry
@@ -75,18 +95,20 @@ Running `pod_builder build [pod name]` will precompile the pod that should be in
75
95
 
76
96
  The following will happen:
77
97
 
78
- - Create one or more (if there are dependencies) _.framework_ file/s under _Frameworks/Rome_ along with its corresponding _dSYM_ files (if applicable)
98
+ - Create one or more (if there are dependencies) _.framework_ file/s under _PodBuilder/Prebuilt_ along with its corresponding _dSYM_ files (if applicable)
79
99
  - Update the Application-Podfile replacing the pod definition with the precompiled ones
80
100
  - Update/create the Podfile.restore (Restore-Podfile)
81
101
  - Update/create PodBuilder.podspec which is a local podspec for your prebuilt frameworks (more on this later)
82
102
 
103
+ By default PodBuilder will only rebuild pods when changes are detected in source code. This behaviour can be overridden by passing the `--force` flag.
104
+
83
105
  #### `build_all` command
84
106
 
85
107
  As `build` but will prebuild all pods defined in PodBuilder-Podfile.
86
108
 
87
109
  #### `update` command
88
110
 
89
- If you decide not to commit the _Rome_ and _dSYM_ folders you can use this command to rebuild all those frameworks that are out-of-sync with the Restore-Podfile or that were built with a different version of the Swift compiler.
111
+ If you decide not to commit the _Prebuilt_ and _dSYM_ folders you can use this command to rebuild all those frameworks that are out-of-sync with the Restore-Podfile or that were built with a different version of the Swift compiler.
90
112
 
91
113
  #### `restore_all` command
92
114
 
@@ -94,7 +116,7 @@ Will recompile all pods to the versions defined in the Restore-Podfile. You woul
94
116
 
95
117
  #### `install_sources` command
96
118
 
97
- When using PodBuilder you loose ability to directly access to the source code of a pod. To overcome this limitation you can use this command which downloads the pod's source code to _Frameworks/Sources_ and with some [tricks](https://medium.com/@t.camin/debugging-prebuilt-frameworks-c9f52d42600b) restores the ability to use the debugger and step into the code of your prebuilt dependencies. This can be very helpful to catch the exact location of a crash when it occurs (showing something more useful than assembly code). It is however advisable to switch to the original pod when doing any advanced debugging during development of code that involves a pod.
119
+ When using PodBuilder you loose ability to directly access to the source code of a pod. To overcome this limitation you can use this command which downloads the pod's source code to _PodBuilder/Sources_ and with some [tricks](https://medium.com/@t.camin/debugging-prebuilt-frameworks-c9f52d42600b) restores the ability to use the debugger and step into the code of your prebuilt dependencies. This can be very helpful to catch the exact location of a crash when it occurs (showing something more useful than assembly code). It is however advisable to switch to the original pod when doing any advanced debugging during development of code that involves a pod.
98
120
 
99
121
  #### `update_lldbinit` command
100
122
 
@@ -117,7 +139,7 @@ Using the switch command you can choose to integrate it:
117
139
  - development. The _Development Pod_ used by CocoaPods
118
140
  - prebuilt. Use the prebuilt pod
119
141
 
120
- To support development pods you should specify the path(s) that contain the pods sources in _Frameworks/PodBuilderDevPodsPaths.json_ as follows
142
+ To support development pods you should specify the path(s) that contain the pods sources in _PodBuilder/PodBuilderDevPodsPaths.json_ as follows
121
143
 
122
144
  ```json
123
145
  [
@@ -248,6 +270,10 @@ Like `build_settings` but per pod. Pod name can also refer to subspec.
248
270
 
249
271
  Specify which build system to use to compile frameworks. Either `Legacy` (standard build system) or `Latest` (new build system). Default value: `Legacy`.
250
272
 
273
+ #### `library_evolution_support`
274
+
275
+ Specify if Swift frameworks should be compiled with library evolution support (BUILD_LIBRARY_FOR_DISTRIBUTION).
276
+
251
277
  #### `license_filename`
252
278
 
253
279
  PodBuilder will create two license files a plist and a markdown file which contains the licenses of each pod specified in the PodBuilder-Podfile. Defailt value: `Pods-acknowledgements`(plist|md).
@@ -284,7 +310,7 @@ Normally when multiple subspecs are specified in a target a single framework is
284
310
 
285
311
  #### `lfs_update_gitattributes` 
286
312
 
287
- Adds a _.gitattributes_ to _Frameworks/Rome_ and _Frameworks/dSYM_ to exclude large files. If `lfs_include_pods_folder` is true it will add a the same _.gitattributes_ to the application's _Pods_ folder as well.
313
+ Adds a _.gitattributes_ to _PodBuilder/Prebuilt_ and _PodBuilder/dSYM_ to exclude large files. If `lfs_include_pods_folder` is true it will add a the same _.gitattributes_ to the application's _Pods_ folder as well.
288
314
 
289
315
 
290
316
  #### `lfs_include_pods_folder`
@@ -292,9 +318,18 @@ Adds a _.gitattributes_ to _Frameworks/Rome_ and _Frameworks/dSYM_ to exclude la
292
318
  See [`lfs_update_gitattributes`](#lfs_update_gitattributes).
293
319
 
294
320
 
321
+ #### `use_bundler`
322
+
323
+ If you use bundler to pin the version of CocoaPods in your project set this to true. Default false.
324
+
325
+ #### `build_for_apple_silicon`
326
+
327
+ If set to true built frameworks will include iPhone simulator slices for Apple silicon based hardware. Default false.
328
+
329
+
295
330
  # Behind the scenes
296
331
 
297
- PodBuilder leverages CocoaPods code and [cocoapods-rome plugin](https://github.com/CocoaPods/Rome) to compile pods into frameworks. Every compiled framework will be boxed (by adding it as a `vendored_framework`) as a subspec of a local podspec. When needed additional settings will be automatically ported from the original podspec, like for example xcconfig settings.
332
+ PodBuilder leverages CocoaPods code and [cocoapods-rome plugin](https://github.com/CocoaPods/Prebuilt) to compile pods into frameworks. Every compiled framework will be boxed (by adding it as a `vendored_framework`) as a subspec of a local podspec. When needed additional settings will be automatically ported from the original podspec, like for example xcconfig settings.
298
333
 
299
334
  # FAQ
300
335
 
@@ -330,7 +365,7 @@ Relaunch the build command passing `-d`, this won't delete the temporary _/tmp/p
330
365
 
331
366
  ### **Do I need to commit compiled frameworks?**
332
367
 
333
- No. If the size of compiled frameworks in your repo is a concern (and for whatever reason you can't use [Git-LFS](#git-lfs)) you can choose add the _Rome_ and _dSYM_ folder to .gitignore and run `pod_builder update` to rebuild all frameworks that need to be recompiled.
368
+ No. If the size of compiled frameworks in your repo is a concern (and for whatever reason you can't use [Git-LFS](#git-lfs)) you can choose add the _Prebuilt_ and _dSYM_ folder to .gitignore and run `pod_builder update` to rebuild all frameworks that need to be recompiled.
334
369
 
335
370
 
336
371
  ### **I get an _'attempt to read non existent folder `/private/tmp/pod_builder/Pods/ podname'_ when building**
@@ -358,10 +393,12 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Subito
358
393
 
359
394
 
360
395
  # Caveats
396
+
361
397
  Code isn't probably the cleanest I ever wrote but given the usefulness of the tool I decided to publish it nevertheless.
362
398
 
363
399
 
364
400
  # Authors
401
+
365
402
  [Tomas Camin](https://github.com/tcamin) ([@tomascamin](https://twitter.com/tomascamin))
366
403
 
367
404
  # License
@@ -36,15 +36,15 @@ Command:
36
36
  + deintegrate Deintegrate prebuild folders
37
37
  + build Build a specific pod declared in the PodBuilder-Podfile
38
38
  + build_all Build all pods declared in the PodBuilder-Podfile
39
- + update Rebuild frameworks that are outdated
39
+ + update Rebuild items that are outdated
40
40
  + restore_all Rebuild all pods declared in the Restore-Podfile
41
- + install_sources Install sources of pods to debug into prebuilt frameworks
42
- + update_lldbinit Generate an lldbinit file with setting target.source-map to debug prebuilt frameworks
41
+ + install_sources Install sources of pods to debug into prebuilt items
42
+ + update_lldbinit Generate an lldbinit file with setting target.source-map to debug prebuilt items
43
43
  + clear_lldbinit Clear an lldbinit file from PodBuilder's customizations
44
44
  + switch Switch between prebuilt/development/standard pod in the Application-Podfile
45
- + clean Remove prebuild frameworks, dSYMs and source files added by `install_sources` command that are no longer in the PodBuilder-Podfile
45
+ + clean Remove prebuild items, dSYMs and source files added by `install_sources` command that are no longer in the PodBuilder-Podfile
46
46
  + sync_podfile Update your Application-Podfile with all pods declared in the PodBuilder-Podfile
47
- + info Print json-formatted informations about prebuilt frameworks
47
+ + info Print json-formatted informations about prebuilt items
48
48
 
49
49
  Options:
50
50
  "
@@ -71,12 +71,15 @@ Options:
71
71
  opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
72
72
  OPTIONS[:update_repos] = false
73
73
  end
74
+ opts.on("-f", "--force", "Rebuild items even when no code change is detected") do |o|
75
+ OPTIONS[:force_rebuild] = false
76
+ end
74
77
  opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
75
78
  OPTIONS[:allow_warnings] = o
76
79
  end
77
- opts.on("-a", "--auto-resolve-deps", "Resolve pod dependencies automatically") do |o|
78
- OPTIONS[:auto_resolve_dependencies] = o
79
- end
80
+ # opts.on("-a", "--auto-resolve-deps", "Resolve pod dependencies automatically") do |o|
81
+ # OPTIONS[:auto_resolve_dependencies] = o
82
+ # end
80
83
  opts.on("-d", "--debug", "Don't clean build folder") do |o|
81
84
  OPTIONS[:debug] = o
82
85
  end
@@ -100,6 +103,9 @@ Options:
100
103
  opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
101
104
  OPTIONS[:update_repos] = false
102
105
  end
106
+ opts.on("-f", "--force", "Rebuild items even when no code change is detected") do |o|
107
+ OPTIONS[:force_rebuild] = false
108
+ end
103
109
  opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
104
110
  OPTIONS[:allow_warnings] = o
105
111
  end
@@ -119,7 +125,7 @@ Usage:
119
125
 
120
126
  $ pod_builder update [OPTIONS]
121
127
 
122
- Rebuild frameworks that are outdated
128
+ Rebuild items that are outdated
123
129
 
124
130
  Options:
125
131
  "
@@ -129,7 +135,7 @@ Options:
129
135
  opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
130
136
  OPTIONS[:allow_warnings] = o
131
137
  end
132
- opts.on("-r", "--dry", "Determine which frameworks need update") do |o|
138
+ opts.on("-r", "--dry", "Determine which items need to be updated") do |o|
133
139
  OPTIONS[:dry_run] = o
134
140
  end
135
141
  opts.on("-d", "--debug", "Don't clean build folder") do |o|
@@ -224,10 +230,13 @@ Usage:
224
230
 
225
231
  $ pod_builder clean
226
232
 
227
- Remove unused framework, dSYM and source folders.
233
+ Remove unused prebuild data, dSYM and source folders.
228
234
 
229
235
  Options:
230
- "
236
+ "
237
+ opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
238
+ OPTIONS[:update_repos] = false
239
+ end
231
240
  end,
232
241
  :call => [
233
242
  PodBuilder::Command::Clean
@@ -241,7 +250,7 @@ Usage:
241
250
 
242
251
  $ pod_builder install_sources
243
252
 
244
- Install source of prebuilt pods to be able to step into and debug framework's code.
253
+ Install source of prebuilt pods to be able to step into and debug prebuilt's code.
245
254
 
246
255
  "
247
256
  end,
@@ -258,9 +267,9 @@ Usage:
258
267
  $ pod_builder update_lldbinit <LLDBINIT_PATH> <PATH>
259
268
 
260
269
  Update LLDBINIT_PATH setting target.source-map in order to be able to step into
261
- and debug prebuilt framework's code.
270
+ and debug prebuilt prebuilt's code.
262
271
 
263
- Specify the PATH of the folder containing the source code of prebuilt frameworks. PATH can be relative to PodBuilder's Framework folder.
272
+ Specify the PATH of the folder containing the source code of prebuilt items. PATH can be relative to PodBuilder's Prebuilt folder.
264
273
 
265
274
  "
266
275
  end,
@@ -289,9 +298,9 @@ Usage:
289
298
  opts.banner = "
290
299
  Usage:
291
300
 
292
- $ pod_builder switch PODNAME [OPTIONS]
301
+ $ pod_builder switch [OPTIONS] PODNAME[s]
293
302
 
294
- Switch integration between prebuilt/development/default pod version.
303
+ Switch integration between prebuilt/development/default pod version. Multiple space separated pods can be passed
295
304
 
296
305
  Options:
297
306
  "
@@ -304,6 +313,9 @@ Options:
304
313
  opts.on("-s", "--default", "Default version specified in PodBuilder-Podfile") do |o|
305
314
  OPTIONS[:switch_mode] = "default"
306
315
  end
316
+ opts.on("-a", "--all", "Include dependencies") do |o|
317
+ OPTIONS[:switch_all] = true
318
+ end
307
319
  end,
308
320
  :call => [
309
321
  PodBuilder::Command::Switch
@@ -321,7 +333,12 @@ Usage:
321
333
  You may want to run this command when you add a new pod to the PodBuilder-Podfile
322
334
  and you want to integrate it in the project without rebuilding it.
323
335
 
324
- " end,
336
+ Options:
337
+ "
338
+ opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
339
+ OPTIONS[:update_repos] = false
340
+ end
341
+ end,
325
342
  :call => [
326
343
  PodBuilder::Command::SyncPodfile
327
344
  ]
@@ -357,9 +374,11 @@ Usage:
357
374
  else
358
375
  PodBuilder::Configuration.load
359
376
 
377
+ PodBuilder::add_lockfile
378
+
360
379
  subcommand[:opts].order!
361
380
  subcommand[:call].each do |k|
362
- if (ret = k.call(OPTIONS)) && ret == -1
381
+ if (ret = k.call) && ret == -1
363
382
  puts subcommand[:opts].help
364
383
  end
365
384
  end
@@ -374,8 +393,6 @@ begin
374
393
  raise "\n\nFor safety do not run this as root\n".red
375
394
  end
376
395
 
377
- PodBuilder::add_lock_file
378
- valid_lock_file = true
379
396
  command_ret = parse_commandline
380
397
  rescue Exception => e
381
398
  error = e.to_s
@@ -392,14 +409,8 @@ rescue Exception => e
392
409
  ensure
393
410
  if command_ret == 0
394
411
  PodBuilder::clean_basepath
395
-
396
- if !OPTIONS.has_key?(:debug)
397
- PodBuilder::safe_rm_rf(PodBuilder::Configuration.build_path)
398
- end
399
- end
400
- if valid_lock_file
401
- PodBuilder::remove_lock_file
402
412
  end
413
+ PodBuilder::remove_lockfile
403
414
 
404
415
  exit(command_ret)
405
416
  end
@@ -1,4 +1,6 @@
1
- require 'pod_builder/cocoapods/specification'
1
+ require 'rubygems/specification'
2
+ require 'pod_builder/rome/pre_install.rb'
3
+ require 'pod_builder/rome/post_install.rb'
2
4
 
3
5
  module PodBuilder
4
6
  class Analyze
@@ -6,6 +8,14 @@ module PodBuilder
6
8
  #
7
9
  def self.installer_at(path, repo_update = false)
8
10
  CLAide::Command::PluginManager.load_plugins("cocoapods")
11
+
12
+ # Manually load inline podbuilder-rome plugin
13
+ pluginspec = Gem::Specification.new("podbuilder-rome", PodBuilder::VERSION)
14
+ pluginspec.activate
15
+
16
+ if !CLAide::Command::PluginManager.loaded_plugins["cocoapods"].map(&:name).include?(pluginspec.name)
17
+ CLAide::Command::PluginManager.loaded_plugins["cocoapods"].push(pluginspec)
18
+ end
9
19
 
10
20
  current_dir = Dir.pwd
11
21
  Dir.chdir(path)
@@ -40,15 +50,30 @@ module PodBuilder
40
50
  checkout_options.merge!(analyzer.sandbox.checkout_sources)
41
51
 
42
52
  all_specs = analysis_result.specifications
53
+
54
+ supported_platforms = analyzer.instance_variable_get("@result").targets.map { |t| t.platform.safe_string_name.downcase }
55
+ all_podfile_items = all_specs.map { |spec| PodfileItem.new(spec, all_specs, checkout_options, supported_platforms) }
43
56
 
44
- all_podfile_specs = all_specs.select { |x| all_podfile_pods.map(&:name).include?(x.name) }
57
+ names = analyzer.explicit_pods().map(&:name)
45
58
 
46
- deps_names = all_podfile_specs.map { |x| x.recursive_dep_names(all_specs) }.flatten.uniq
59
+ podfile_pods = []
60
+ last_count = -1
61
+ while podfile_pods.count != last_count do
62
+ last_count = podfile_pods.count
47
63
 
48
- all_podfile_specs += all_specs.select { |x| deps_names.include?(x.name) }
49
- all_podfile_specs.uniq!
50
-
51
- return all_podfile_specs.map { |spec| PodfileItem.new(spec, all_specs, checkout_options) }
64
+ updated_names = []
65
+ names.each do |name|
66
+ if pod = all_podfile_items.detect { |t| t.name == name }
67
+ podfile_pods.push(pod)
68
+ updated_names += pod.dependency_names
69
+ end
70
+ end
71
+
72
+ names = updated_names.uniq
73
+ podfile_pods.uniq!
74
+ end
75
+
76
+ return podfile_pods.sort_by(&:name)
52
77
  end
53
78
  end
54
79
  end
@@ -0,0 +1,16 @@
1
+ require 'cocoapods/installer/analyzer.rb'
2
+
3
+ module Pod
4
+ class Installer
5
+ class Analyzer
6
+ def explicit_pods
7
+ pods = []
8
+ podfile.root_target_definitions[0].children.each do |children|
9
+ pods += children.dependencies
10
+ end
11
+
12
+ pods.flatten.uniq.sort
13
+ end
14
+ end
15
+ end
16
+ end
@@ -3,7 +3,7 @@ require 'pod_builder/core'
3
3
  module PodBuilder
4
4
  module Command
5
5
  class Build
6
- def self.call(options)
6
+ def self.call
7
7
  Configuration.check_inited
8
8
  PodBuilder::prepare_basepath
9
9
 
@@ -13,20 +13,28 @@ module PodBuilder
13
13
  return -1
14
14
  end
15
15
 
16
- raise "\n\nPlease rename your Xcode installation path removing spaces, current `#{`xcode-select -p`.strip()}`\n" if `xcode-select -p`.strip().include?(" ")
16
+ raise "\n\nPlease rename your Xcode installation path removing spaces, current `#{`xcode-select -p`.strip()}`\n".red if `xcode-select -p`.strip().include?(" ")
17
17
 
18
18
  Podfile.sanity_check()
19
19
  check_not_building_subspecs(argument_pods)
20
20
 
21
- install_update_repo = options.fetch(:update_repos, true)
21
+ puts "Loading Podfile".yellow
22
+
23
+ install_update_repo = OPTIONS.fetch(:update_repos, true)
22
24
  installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
23
25
 
24
26
  all_buildable_items = Analyze.podfile_items(installer, analyzer)
25
27
  prebuilt_items = all_buildable_items.select { |x| x.is_prebuilt }
26
28
  buildable_items = all_buildable_items - prebuilt_items
27
29
 
28
- if argument_pods.first == "*"
29
- argument_pods = buildable_items.map(&:root_name)
30
+ build_all = argument_pods.first == "*"
31
+ if build_all
32
+ argument_pods = all_buildable_items.map(&:root_name).uniq
33
+ else
34
+ argument_pods = Podfile::resolve_pod_names(argument_pods, all_buildable_items)
35
+ deps = all_buildable_items.select { |t| argument_pods.include?(t.root_name) }.map(&:dependency_names).flatten.map { |t| t.split("/").first }
36
+ argument_pods += deps
37
+ argument_pods.uniq!
30
38
  end
31
39
 
32
40
  available_argument_pods = argument_pods.select { |x| all_buildable_items.map(&:root_name).include?(x) }
@@ -41,10 +49,10 @@ module PodBuilder
41
49
 
42
50
  restore_file_error = Podfile.restore_file_sanity_check
43
51
 
44
- check_splitted_subspecs_are_static(all_buildable_items, options)
52
+ check_splitted_subspecs_are_static(all_buildable_items)
45
53
  check_pods_exists(argument_pods, all_buildable_items)
46
54
 
47
- pods_to_build = resolve_pods_to_build(argument_pods, buildable_items, options)
55
+ pods_to_build = resolve_pods_to_build(argument_pods, buildable_items)
48
56
  buildable_items -= pods_to_build
49
57
 
50
58
  # We need to split pods to build in 3 groups
@@ -52,7 +60,7 @@ module PodBuilder
52
60
  # 2. pods to build in release
53
61
  # 3. pods to build in debug
54
62
 
55
- check_not_building_development_pods(pods_to_build, options)
63
+ check_not_building_development_pods(pods_to_build)
56
64
 
57
65
  pods_to_build_subspecs = pods_to_build.select { |x| x.is_subspec && Configuration.subspecs_to_split.include?(x.name) }
58
66
 
@@ -73,34 +81,37 @@ module PodBuilder
73
81
  licenses = []
74
82
 
75
83
  podfiles_items.select { |x| x.count > 0 }.each do |podfile_items|
76
- podfile_items = add_dependencies(podfile_items, all_buildable_items)
77
- podfile_content = Podfile.from_podfile_items(podfile_items, analyzer)
84
+ build_configuration = podfile_items.map(&:build_configuration).uniq.first
78
85
 
79
- Install.podfile(podfile_content, podfile_items, podfile_items.first.build_configuration)
80
-
81
- licenses += license_specifiers
86
+ podfile_items = podfile_items.map { |t| t.recursive_dependencies(all_buildable_items) }.flatten.uniq
87
+ podfile_content = Podfile.from_podfile_items(podfile_items, analyzer, build_configuration)
88
+
89
+ licenses += Install.podfile(podfile_content, podfile_items, podfile_items.first.build_configuration)
82
90
 
83
91
  # remove lockfile which gets unexplicably created
84
92
  FileUtils.rm_f(PodBuilder::basepath("Podfile.lock"))
85
93
  end
86
94
 
87
- clean_frameworks_folder(all_buildable_items)
95
+ Clean::prebuilt_items(all_buildable_items)
88
96
 
89
97
  Licenses::write(licenses, all_buildable_items)
90
98
 
91
- GenerateLFS::call(nil)
99
+ GenerateLFS::call()
92
100
  Podspec::generate(all_buildable_items, analyzer)
93
101
 
94
102
  builded_pods = podfiles_items.flatten
95
- builded_pods_and_deps = add_dependencies(builded_pods, all_buildable_items).select { |x| !x.is_prebuilt }
103
+
104
+ builded_pods_and_deps = podfiles_items.flatten.map { |t| t.recursive_dependencies(all_buildable_items) }.flatten.uniq
105
+ builded_pods_and_deps.select! { |x| !x.is_prebuilt }
106
+
96
107
  Podfile::write_restorable(builded_pods_and_deps + prebuilt_pods_to_install, all_buildable_items, analyzer)
97
- if !options.has_key?(:skip_prebuild_update)
108
+ if !OPTIONS.has_key?(:skip_prebuild_update)
98
109
  Podfile::write_prebuilt(all_buildable_items, analyzer)
99
110
  end
100
111
 
101
112
  Podfile::install
102
113
 
103
- sanity_checks(options)
114
+ sanity_checks
104
115
 
105
116
  if (restore_file_error = restore_file_error) && Configuration.restore_enabled
106
117
  puts "\n\n⚠️ Podfile.restore was found invalid and was overwritten. Error:\n #{restore_file_error}".red
@@ -112,101 +123,6 @@ module PodBuilder
112
123
 
113
124
  private
114
125
 
115
- def self.license_specifiers
116
- acknowledge_files = Dir.glob("#{PodBuilder::Configuration.build_path}/Pods/**/*acknowledgements.plist")
117
- raise "Too many ackwnoledge files found" if acknowledge_files.count > 1
118
-
119
- if acknowledge_file = acknowledge_files.first
120
- plist = CFPropertyList::List.new(:file => acknowledge_file)
121
- data = CFPropertyList.native_types(plist.value)
122
-
123
- return data["PreferenceSpecifiers"]
124
- end
125
-
126
- return []
127
- end
128
-
129
- def self.add_dependencies(pods, buildable_items)
130
- pods.dup.each do |pod|
131
- build_configuration = pods.first.build_configuration
132
-
133
- dependencies = pod.dependencies(buildable_items).select { |x| !pods.include?(x) && !pod.has_common_spec(x.name) }
134
- dependencies.each { |x| x.build_configuration = build_configuration }
135
- pods = dependencies + pods # dependencies should come first
136
- end
137
-
138
- return pods
139
- end
140
-
141
- def self.buildable_dependencies(pod, buildable_items)
142
- deps = []
143
-
144
- pod.dependency_names.each do |dependency|
145
- buildable_pods = buildable_items.select { |t| t.root_name == dependency }
146
- if buildable_pods.any? { |t| t.source_files.count > 0 }
147
- deps.push(dependency)
148
- end
149
- end
150
-
151
- return deps
152
- end
153
-
154
- def self.expected_common_dependencies(pods_to_build, buildable_items, options)
155
- warned_expected_pod_list = []
156
- expected_pod_list = []
157
- errors = []
158
-
159
- pods_to_build.each do |pod_to_build|
160
- buildable_dependencies(pod_to_build, buildable_items).each do |dependency|
161
- unless buildable_items.detect { |x| x.root_name == dependency || x.name == dependency } != nil
162
- next
163
- end
164
-
165
- buildable_items.each do |buildable_pod|
166
- unless !buildable_dependencies(pod_to_build, buildable_items).include?(buildable_pod.name)
167
- next
168
- end
169
-
170
- if buildable_dependencies(buildable_pod, buildable_items).include?(dependency) && !buildable_pod.has_subspec(dependency) && !buildable_pod.has_common_spec(dependency) then
171
- expected_pod_list += pods_to_build.map(&:root_name) + [buildable_pod.root_name]
172
- expected_pod_list.uniq!
173
-
174
- expected_list = expected_pod_list.join(" ")
175
- if !warned_expected_pod_list.include?(expected_list)
176
- errors.push("Can't build #{pod_to_build.name} because it has common dependencies (#{dependency}) with #{buildable_pod.name}.\n\nUse `pod_builder build #{expected_list}` instead or use `pod_builder build -a #{pod_to_build.name}` to automatically resolve missing dependencies\n\n")
177
- errors.uniq!
178
- warned_expected_pod_list.push(expected_list)
179
-
180
- if options.has_key?(:auto_resolve_dependencies)
181
- puts "`#{pod_to_build.name}` has the following dependencies:\n`#{buildable_dependencies(pod_to_build, buildable_items).join("`, `")}`\nWhich are in common with `#{buildable_pod.name}` and requires it to be recompiled\n\n".yellow
182
- end
183
- end
184
- end
185
- end
186
- end
187
- end
188
-
189
- return expected_pod_list, errors
190
- end
191
-
192
- def self.expected_parent_dependencies(pods_to_build, buildable_items, options)
193
- expected_pod_list = []
194
- errors = []
195
-
196
- buildable_items_dependencies = buildable_items.map(&:dependency_names).flatten.uniq
197
- pods_to_build.each do |pod_to_build|
198
- if buildable_items_dependencies.include?(pod_to_build.name)
199
- parent = buildable_items.detect { |x| x.dependency_names.include?(pod_to_build.name) }
200
-
201
- expected_pod_list += (pods_to_build + [parent]).map(&:root_name)
202
- expected_pod_list.uniq!
203
- errors.push("Can't build #{pod_to_build.name} because it is a dependency of #{parent.name}.\n\nUse `pod_builder build #{expected_pod_list.join(" ")}` instead\n\n")
204
- end
205
- end
206
-
207
- return expected_pod_list, errors
208
- end
209
-
210
126
  def self.check_not_building_subspecs(pods_to_build)
211
127
  pods_to_build.each do |pod_to_build|
212
128
  if pod_to_build.include?("/")
@@ -216,7 +132,7 @@ module PodBuilder
216
132
  end
217
133
 
218
134
  def self.check_pods_exists(pods, buildable_items)
219
- raise "Empty Podfile?" if buildable_items.nil?
135
+ raise "\n\nEmpty Podfile?".red if buildable_items.nil?
220
136
 
221
137
  buildable_items = buildable_items.map(&:root_name)
222
138
  pods.each do |pod|
@@ -224,7 +140,7 @@ module PodBuilder
224
140
  end
225
141
  end
226
142
 
227
- def self.check_splitted_subspecs_are_static(all_buildable_items, options)
143
+ def self.check_splitted_subspecs_are_static(all_buildable_items)
228
144
  non_static_subspecs = all_buildable_items.select { |x| x.is_subspec && x.is_static == false }
229
145
  non_static_subspecs_names = non_static_subspecs.map(&:name)
230
146
 
@@ -234,11 +150,11 @@ module PodBuilder
234
150
  return
235
151
  end
236
152
 
237
- warn_message = "The following pods `#{invalid_subspecs.join(" ")}` are non static frameworks which are being splitted over different targets. Beware that this is an unsafe setup as per https://github.com/CocoaPods/CocoaPods/issues/5708 and https://github.com/CocoaPods/CocoaPods/issues/5643\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n"
238
- if options[:allow_warnings]
153
+ warn_message = "The following pods `#{invalid_subspecs.join(" ")}` are non static binaries which are being splitted over different targets. Beware that this is an unsafe setup as per https://github.com/CocoaPods/CocoaPods/issues/5708 and https://github.com/CocoaPods/CocoaPods/issues/5643\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n"
154
+ if OPTIONS[:allow_warnings]
239
155
  puts "\n\n⚠️ #{warn_message}".yellow
240
156
  else
241
- raise "\n\n🚨️ #{warn_message}".yellow
157
+ raise "\n\n🚨️ #{warn_message}".red
242
158
  end
243
159
  end
244
160
 
@@ -252,14 +168,14 @@ module PodBuilder
252
168
  pods_with_unaligned_build_configuration = pods_with_common_deps.select { |x| x.build_configuration != pod.build_configuration }
253
169
  pods_with_unaligned_build_configuration.map!(&:name)
254
170
 
255
- raise "Dependencies of `#{pod.name}` don't have the same build configuration (#{pod.build_configuration}) of `#{pods_with_unaligned_build_configuration.join(",")}`'s dependencies" if pods_with_unaligned_build_configuration.count > 0
171
+ raise "\n\nDependencies of `#{pod.name}` don't have the same build configuration (#{pod.build_configuration}) of `#{pods_with_unaligned_build_configuration.join(",")}`'s dependencies".red if pods_with_unaligned_build_configuration.count > 0
256
172
  end
257
173
  end
258
174
 
259
- def self.check_not_building_development_pods(pods, options)
260
- if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0 && (options[:allow_warnings].nil? && Configuration.allow_building_development_pods == false)
175
+ def self.check_not_building_development_pods(pods)
176
+ if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0 && (OPTIONS[:allow_warnings].nil? && Configuration.allow_building_development_pods == false)
261
177
  pod_names = development_pods.map(&:name).join(", ")
262
- raise "The following pods are in development mode: `#{pod_names}`, won't proceed building.\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n"
178
+ raise "\n\nThe following pods are in development mode: `#{pod_names}`, won't proceed building.\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n".red
263
179
  end
264
180
  end
265
181
 
@@ -272,7 +188,7 @@ module PodBuilder
272
188
  return buildable_subspecs - pods_to_build
273
189
  end
274
190
 
275
- def self.sanity_checks(options)
191
+ def self.sanity_checks
276
192
  lines = File.read(PodBuilder::project_path("Podfile")).split("\n")
277
193
  stripped_lines = lines.map { |x| Podfile.strip_line(x) }.select { |x| !x.start_with?("#")}
278
194
 
@@ -280,7 +196,7 @@ module PodBuilder
280
196
 
281
197
  if !expected_stripped.all? { |x| stripped_lines.include?(x) }
282
198
  warn_message = "PodBuilder's post install actions missing from application Podfile!\n"
283
- if options[:allow_warnings]
199
+ if OPTIONS[:allow_warnings]
284
200
  puts "\n\n⚠️ #{warn_message}".yellow
285
201
  else
286
202
  raise "\n\n🚨️ #{warn_message}".red
@@ -288,60 +204,14 @@ module PodBuilder
288
204
  end
289
205
  end
290
206
 
291
- def self.resolve_pods_to_build(argument_pods, buildable_items, options)
207
+ def self.resolve_pods_to_build(argument_pods, buildable_items)
292
208
  pods_to_build = []
293
209
 
294
- fns = [method(:expected_common_dependencies), method(:expected_parent_dependencies)]
295
- fns.each do |fn|
296
- loop do
297
- pods_to_build = buildable_items.select { |x| argument_pods.include?(x.root_name) }
298
- pods_to_build += other_subspecs(pods_to_build, buildable_items)
299
- tmp_buildable_items = buildable_items - pods_to_build
300
-
301
- expected_pods, errors = fn.call(pods_to_build, tmp_buildable_items, options)
302
- if expected_pods.count > 0
303
- if !options.has_key?(:auto_resolve_dependencies) && expected_pods.count > 0
304
- raise "\n\n#{errors.join("\n")}".red
305
- else
306
- argument_pods = expected_pods.uniq
307
- end
308
- end
309
-
310
- if !options.has_key?(:auto_resolve_dependencies) || expected_pods.count == 0
311
- break
312
- end
313
- end
314
- end
210
+ pods_to_build = buildable_items.select { |x| argument_pods.include?(x.root_name) }
211
+ pods_to_build += other_subspecs(pods_to_build, buildable_items)
315
212
 
316
213
  return pods_to_build
317
- end
318
-
319
- def self.clean_frameworks_folder(buildable_items)
320
- puts "Cleaning framework folder".yellow
321
-
322
- expected_frameworks = buildable_items.map { |x| "#{x.module_name}.framework" }
323
- expected_frameworks += buildable_items.map { |x| x.vendored_items }.flatten.map { |x| File.basename(x) }
324
- expected_frameworks.uniq!
325
-
326
- existing_frameworks = Dir.glob("#{PodBuilder::basepath("Rome")}/*.framework")
327
-
328
- existing_frameworks.each do |existing_framework|
329
- existing_framework_name = File.basename(existing_framework)
330
- if !expected_frameworks.include?(existing_framework_name)
331
- puts "Cleanining up `#{existing_framework_name}`, no longer found among dependencies".blue
332
- FileUtils.rm_rf(existing_framework)
333
- end
334
- end
335
-
336
- existing_dsyms = Dir.glob("#{PodBuilder::basepath("dSYM")}/**/*.dSYM")
337
- existing_dsyms.each do |existing_dsym|
338
- existing_dsym_name = File.basename(existing_dsym)
339
- if !expected_frameworks.include?(existing_dsym_name.gsub(".dSYM", ""))
340
- puts "Cleanining up `#{existing_dsym_name}`, no longer found among dependencies".blue
341
- FileUtils.rm_rf(existing_dsym)
342
- end
343
- end
344
- end
214
+ end
345
215
  end
346
216
  end
347
217
  end