3 # This file has been automatically generated from a template file.
4 # Please make modifications to
5 # `templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template`
6 # instead. This file can be regenerated from the template by running
7 # `tools/buildgen/generate_projects.sh`.
9 # CocoaPods podspec for the gRPC Proto Compiler Plugin
11 # Copyright 2016, Google Inc.
12 # All rights reserved.
14 # Redistribution and use in source and binary forms, with or without
15 # modification, are permitted provided that the following conditions are
18 # * Redistributions of source code must retain the above copyright
19 # notice, this list of conditions and the following disclaimer.
20 # * Redistributions in binary form must reproduce the above
21 # copyright notice, this list of conditions and the following disclaimer
22 # in the documentation and/or other materials provided with the
24 # * Neither the name of Google Inc. nor the names of its
25 # contributors may be used to endorse or promote products derived from
26 # this software without specific prior written permission.
28 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 # This pod is only a utility that will be used by other pods _at install time_ (not at compile
42 # time). Other pods can access it in their `prepare_command` script, under <pods_root>/<pod name>.
43 # Because CocoaPods installs pods in alphabetical order, beginning this pod's name with an
44 # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
46 s.name = '!ProtoCompiler-gRPCPlugin'
47 v = '${settings.version}'
49 s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
50 s.description = <<-DESC
51 This podspec only downloads the gRPC protoc plugin so that local pods generating protos can use
52 it in their invocation of protoc, as part of their prepare_command.
53 The generated code will have a dependency on the gRPC Objective-C Proto runtime of the same
54 version. The runtime can be obtained as the "gRPC-ProtoRPC" pod.
56 s.homepage = 'https://grpc.io'
58 :type => 'Apache License, Version 2.0',
60 Copyright 2015, Google Inc.
63 Redistribution and use in source and binary forms, with or without
64 modification, are permitted provided that the following conditions are
67 * Redistributions of source code must retain the above copyright
68 notice, this list of conditions and the following disclaimer.
69 * Redistributions in binary form must reproduce the above
70 copyright notice, this list of conditions and the following disclaimer
71 in the documentation and/or other materials provided with the
73 * Neither the name of Google Inc. nor the names of its
74 contributors may be used to endorse or promote products derived from
75 this software without specific prior written permission.
77 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
78 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
79 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
80 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
81 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
82 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
83 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
84 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
85 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
86 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
87 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90 s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
93 file = "grpc_objective_c_plugin-#{v}-macos-x86_64.zip"
95 :http => "https://github.com/#{repo}/releases/download/v#{v}/#{file}",
96 # TODO(jcanizales): Add sha1 or sha256
101 bazel = "#{repo_root}/tools/bazel"
102 plugin = 'grpc_objective_c_plugin'
104 s.preserve_paths = plugin
106 # Restrict the protoc version to the one supported by this plugin.
107 s.dependency '!ProtoCompiler', '3.13.0'
108 # For the Protobuf dependency not to complain:
109 s.ios.deployment_target = '9.0'
110 s.osx.deployment_target = '10.10'
111 s.tvos.deployment_target = '10.0'
113 # watchOS is disabled due to #20258.
114 # TODO (mxyan): Enable watchos when !ProtoCompiler.podspec is updated for
115 # support of watchos in the next release
116 # s.watchos.deployment_target = '4.0'
118 # Restrict the gRPC runtime version to the one supported by this plugin.
119 s.dependency 'gRPC-ProtoRPC', v
121 # This is only for local development of the plugin: If the Podfile brings this pod from a local
122 # directory using `:path`, CocoaPods won't download the zip file and so the plugin won't be
123 # present in this pod's directory. We use that knowledge to check for the existence of the file
124 # and, if absent, compile the plugin from the local sources.
125 s.prepare_command = <<-CMD
126 if [ ! -f #{plugin} ]; then
127 #{bazel} build //src/compiler:grpc_objective_c_plugin