| 1 |
# This file has been automatically generated from a template file. |
| 2 |
# Please make modifications to |
| 3 |
# `templates/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec.template` |
| 4 |
# instead. This file can be regenerated from the template by running |
| 5 |
# `tools/buildgen/generate_projects.sh`. |
| 6 |
|
| 7 |
# CocoaPods podspec for the gRPC Proto Compiler Plugin |
| 8 |
# |
| 9 |
# Copyright 2019, Google Inc. |
| 10 |
# All rights reserved. |
| 11 |
# |
| 12 |
# Redistribution and use in source and binary forms, with or without |
| 13 |
# modification, are permitted provided that the following conditions are |
| 14 |
# met: |
| 15 |
# |
| 16 |
# * Redistributions of source code must retain the above copyright |
| 17 |
# notice, this list of conditions and the following disclaimer. |
| 18 |
# * Redistributions in binary form must reproduce the above |
| 19 |
# copyright notice, this list of conditions and the following disclaimer |
| 20 |
# in the documentation and/or other materials provided with the |
| 21 |
# distribution. |
| 22 |
# * Neither the name of Google Inc. nor the names of its |
| 23 |
# contributors may be used to endorse or promote products derived from |
| 24 |
# this software without specific prior written permission. |
| 25 |
# |
| 26 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 27 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 28 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 29 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 30 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 31 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 32 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 33 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 34 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 35 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 36 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 37 |
|
| 38 |
Pod::Spec.new do |s| |
| 39 |
# This pod is only a utility that will be used by other pods _at install time_ (not at compile |
| 40 |
# time). Other pods can access it in their `prepare_command` script, under <pods_root>/<pod name>. |
| 41 |
# Because CocoaPods installs pods in alphabetical order, beginning this pod's name with an |
| 42 |
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed |
| 43 |
# before them. |
| 44 |
s.name = '!ProtoCompiler-gRPCCppPlugin' |
| 45 |
v = '1.51.1' |
| 46 |
s.version = v |
| 47 |
s.summary = 'The gRPC ProtoC plugin generates C++ files from .proto services.' |
| 48 |
s.description = <<-DESC |
| 49 |
This podspec only downloads the gRPC protoc plugin so that local pods generating protos can use |
| 50 |
it in their invocation of protoc, as part of their prepare_command. |
| 51 |
DESC |
| 52 |
s.homepage = 'https://grpc.io' |
| 53 |
s.license = { |
| 54 |
:type => 'Apache License, Version 2.0', |
| 55 |
:text => <<-LICENSE |
| 56 |
Copyright 2019, Google Inc. |
| 57 |
All rights reserved. |
| 58 |
|
| 59 |
Redistribution and use in source and binary forms, with or without |
| 60 |
modification, are permitted provided that the following conditions are |
| 61 |
met: |
| 62 |
|
| 63 |
* Redistributions of source code must retain the above copyright |
| 64 |
notice, this list of conditions and the following disclaimer. |
| 65 |
* Redistributions in binary form must reproduce the above |
| 66 |
copyright notice, this list of conditions and the following disclaimer |
| 67 |
in the documentation and/or other materials provided with the |
| 68 |
distribution. |
| 69 |
* Neither the name of Google Inc. nor the names of its |
| 70 |
contributors may be used to endorse or promote products derived from |
| 71 |
this software without specific prior written permission. |
| 72 |
|
| 73 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 74 |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 75 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 76 |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 77 |
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 78 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 79 |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 80 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 81 |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 82 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 83 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 84 |
LICENSE |
| 85 |
} |
| 86 |
s.authors = { 'The gRPC contributors' => '[email protected]' } |
| 87 |
|
| 88 |
repo = 'grpc/grpc' |
| 89 |
file = "grpc_cpp_plugin-#{v}-macos-x86_64.zip" |
| 90 |
s.source = { |
| 91 |
:http => "https://github.com/#{repo}/releases/download/v#{v}/#{file}", |
| 92 |
# TODO(jcanizales): Add sha1 or sha256 |
| 93 |
# :sha1 => '??', |
| 94 |
} |
| 95 |
|
| 96 |
repo_root = '../..' |
| 97 |
bazel = "#{repo_root}/tools/bazel" |
| 98 |
plugin = 'grpc_cpp_plugin' |
| 99 |
|
| 100 |
s.preserve_paths = plugin |
| 101 |
|
| 102 |
# Restrict the protoc version to the one supported by this plugin. |
| 103 |
s.dependency '!ProtoCompiler', '3.21.6' |
| 104 |
# For the Protobuf dependency not to complain: |
| 105 |
s.ios.deployment_target = '9.0' |
| 106 |
s.osx.deployment_target = '10.10' |
| 107 |
s.tvos.deployment_target = '10.0' |
| 108 |
s.watchos.deployment_target = '2.0' |
| 109 |
|
| 110 |
# This is only for local development of the plugin: If the Podfile brings this pod from a local |
| 111 |
# directory using `:path`, CocoaPods won't download the zip file and so the plugin won't be |
| 112 |
# present in this pod's directory. We use that knowledge to check for the existence of the file |
| 113 |
# and, if absent, compile the plugin from the local sources. |
| 114 |
s.prepare_command = <<-CMD |
| 115 |
set -e |
| 116 |
#{bazel} build //src/compiler:grpc_cpp_plugin |
| 117 |
CMD |
| 118 |
end |