@@ -7,7 +7,7 @@ an easy to use macro.
77
88In the root directory, add ` rules_pods ` to the Bazel ` WORKSPACE ` .
99
10- ```
10+ ``` bazel
1111http_archive(
1212 name = " rules_pods" ,
1313 urls = [" https://github.com/pinterest/PodToBUILD/releases/download/0.25.2-8a5efa0/PodToBUILD.zip" ],
@@ -18,7 +18,7 @@ http_archive(
1818
1919Pods are defined in the ` WORKSPACE ` file with the macro, ` new_pod_repository ` .
2020
21- ```
21+ ``` bazel
2222# Load the new_pod_repository macro - needed for `WORKSPACE` usage
2323load(" @rules_pods//BazelExtensions:workspace.bzl" , " new_pod_repository" )
2424
@@ -34,9 +34,9 @@ are combined to form the label `@PINOperation//:PINOperation`.
3434
3535Thats all! Bazel will automatically setup pods along with the build.
3636
37- _ See the [ examples] ( https://github.com/pinterest/PodToBUILD/tree/master/ Examples) for end to end usage_ .
37+ _ See the [ examples] ( Examples ) for end to end usage_ .
3838
39- ### Vendoring Pods via Pods.WORKSPACE
39+ ### Vendoring Pods via ` Pods.WORKSPACE `
4040
4141By default, ` rules_pods ` supports Bazel's [ conventional dependency management
4242system] ( https://docs.bazel.build/versions/master/external.html ) via the
@@ -62,7 +62,7 @@ Create the file `Pods.WORKSPACE` and add `new_pod_repository`s' there -
6262Anytime ` Pods.WORKSPACE ` is changed, ` update_pods ` must be ran to ensure all
6363pods are updated.
6464
65- ```
65+ ``` sh
6666# src_root is the root workspace directory
6767bazel run @rules_pods//:update_pods -- --src_root $PWD
6868```
@@ -72,11 +72,9 @@ In addition to out of band updating, labels are formed via the convention
7272is identical across ` WORKSPACE ` and ` Pods.WORKSPACE ` , the only difference is
7373that the ` load ` statement isn't required in ` Pods.WORKSPACE ` .
7474
75- _ See the
76- [ Texture] ( https://github.com/pinterest/PodToBUILD/tree/master/Examples/Texture )
77- example for a comprehensive example._
75+ _ See the [ Texture] ( Examples/Texture ) example for a comprehensive example._
7876
79- ## new_pod_repository
77+ ## ` new_pod_repository `
8078
8179This macro is the main point of integration for pod dependencies.
8280
@@ -120,7 +118,7 @@ Instead of using a `url` that points to the remote repository, use a `url` that
120118points to the local repository.
121119
122120For example, if we wanted to depend on a local version of ` PINOperation ` :
123- ```
121+ ``` bazel
124122new_pod_repository(
125123 name = " PINOperation" ,
126124 url = " /Path/To/PINOperation" ,
@@ -152,7 +150,7 @@ compiler supports customizing attributes of generated targets.
152150For example, to add a custom ` copt ` to ` PINOperation ` we could turn on pedantic
153151warnings just for ` PINOperation//:PINOperation `
154152
155- ```
153+ ``` bazel
156154new_pod_repository(
157155 name = " PINOperation" ,
158156 url = " https://github.com/pinterest/PINOperation/archive/1.2.1.zip" ,
@@ -163,7 +161,7 @@ new_pod_repository(
163161On ` objc_library ` , the following fields are supported: ` copts ` , ` deps ` ,
164162` sdk_frameworks `
165163
166- ### Acknowledgements Plist and Settings.bundle
164+ ### Acknowledgements Plist and ` Settings.bundle `
167165
168166Acknowledgments metadata from a Pod is supported.
169167
@@ -173,7 +171,7 @@ generated. Acknowledgment targets have the label of the form
173171
174172Merge all of the dependencies into ` Settings.bundle `
175173
176- ```
174+ ``` bazel
177175load(" @rules_pods//BazelExtensions:extensions.bzl" , " acknowledgments_plist" )
178176
179177# Example `Settings`.bundle target
@@ -223,7 +221,7 @@ Implemented for:
223221Example usage: add a custom define to the target, Texture's ` copts `
224222field
225223
226- ```
224+ ``` bazel
227225user_options = [ " Texture.copts += -DTEXTURE_DEBUG " ]
228226```
229227
@@ -259,10 +257,10 @@ Apple File systems support different characters than Linux ones do. Bazel uses
259257the least common denominator, the Linux convention. For now, use an
260258` install_script ` to resolve differences.
261259
262- ### __ has_include directive
260+ ### ` __has_include directive `
263261
264- Some code, like [ Texture] ( https://github.com/pinterest/PodToBUILD/tree/master/ Examples/Texture) , uses
265- ` __has_include ` to conditionally include code.
262+ Some code, like [ Texture] ( Examples/Texture ) , uses ` __has_include ` to
263+ conditionally include code.
266264
267265In Bazel, if that include is not explicitly added, then this feature will not
268266work. In this case, use a ` user_option ` to add dependencies available on the
@@ -278,7 +276,7 @@ replaced in the podspec file before the `BUILD` file is generated.
278276
279277For example ` SPUserResizableView+Pion ` exbibits this issue.
280278
281- ```
279+ ``` bazel
282280new_pod_repository(
283281 name = " SPUserResizableView_Pion" ,
284282 url = " https://github.com/keleixu/SPUserResizableView/archive/b263fc4e8101c6c5ac352806fb5c31aa69e32025.zip" ,
@@ -327,7 +325,7 @@ CocoaPods. _Please do file issues and PRs for pods that don't work._
327325The short answer is yes, but probably not. Swift support in ` rules_pods ` , and
328326Bazel ( ` swift_library ` / ` rules_swift ` ) is still under development.
329327
330- ### Should I do source builds of rules_pods?
328+ ### Should I do source builds of ` rules_pods ` ?
331329
332330The short answer is probably not. Consider that building ` rules_pods ` along with
333331an iOS application ties the build environment of ` rules_pods ` to that of the iOS
@@ -339,10 +337,9 @@ Bazel if it is checked out as such. Simply use `git_repository` instead of
339337` http_archive ` as mentioned in the quickstart guide. ` building ` with Bazel isn't
340338well supported in ` repository_rules ` , and isn't supported at the moment.
341339
342- ### How do I update rules_pods?
340+ ### How do I update ` rules_pods ` ?
343341
344- See the [ quickstart
345- instructions] ( https://github.com/pinterest/PodToBUILD/tree/master#quickstart-instructions ) .
342+ See the [ quickstart instructions] ( #quickstart-instructions ) .
346343
347344### How can I generate an Xcode project for Bazel built pods?
348345
@@ -355,12 +352,12 @@ The documentation of building an iOS application resides in the [Bazel
355352documentation] ( https://docs.bazel.build/versions/master/tutorial/ios-app.html ) .
356353This README and examples are intended to cover the rest.
357354
358- ### How can I develop rules_pods?
355+ ### How can I develop ` rules_pods ` ?
359356
360357` make ` is the canonical build system of ` rules_pods ` - see the ` Makefile ` for up
361358to date development workflows.
362359
363- The [ examples] ( https://github.com/pinterest/PodToBUILD/tree/master/ Examples) are intended to be tested, minimal, end to end, use cases of
360+ The [ examples] ( Examples ) are intended to be tested, minimal, end to end, use cases of
364361` rules_pods ` . The examples do a source build of ` rules_pods ` , and setup pods.
365362Simply cd into an example, and run ` make ` .
366363
0 commit comments