Generate more files in gRPC-Core.podspec from build.yaml

pull/13835/head
Muxi Yan 7 years ago
parent 0dd982cf4c
commit b0f821cef9
  1. 117
      gRPC-Core.podspec
  2. 71
      templates/gRPC-Core.podspec.template

@ -963,7 +963,8 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Cronet-Interface", version
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
'src/core/ext/transport/cronet/transport/cronet_transport.cc',
'src/core/ext/transport/cronet/transport/cronet_transport.h',
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
end
@ -973,17 +974,111 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
ss.source_files = 'test/core/end2end/cq_verifier.{cc,h}',
'test/core/end2end/end2end_tests.{cc,h}',
'test/core/end2end/end2end_test_utils.cc',
'test/core/end2end/tests/*.{cc,h}',
'test/core/end2end/fixtures/*.h',
'test/core/end2end/data/*.{cc,h}',
'test/core/util/debugger_macros.{cc,h}',
'test/core/util/test_config.{cc,h}',
'test/core/util/port.h',
ss.source_files = 'test/core/util/test_config.cc',
'test/core/util/test_config.h',
'test/core/end2end/data/client_certs.cc',
'test/core/end2end/data/server1_cert.cc',
'test/core/end2end/data/server1_key.cc',
'test/core/end2end/data/test_root_cert.cc',
'test/core/security/oauth2_utils.cc',
'test/core/end2end/cq_verifier.cc',
'test/core/end2end/fixtures/http_proxy_fixture.cc',
'test/core/end2end/fixtures/proxy.cc',
'test/core/iomgr/endpoint_tests.cc',
'test/core/util/debugger_macros.cc',
'test/core/util/grpc_profiler.cc',
'test/core/util/histogram.cc',
'test/core/util/memory_counters.cc',
'test/core/util/mock_endpoint.cc',
'test/core/util/parse_hexstring.cc',
'test/core/util/passthru_endpoint.cc',
'test/core/util/port.cc',
'test/core/util/port_server_client.{cc,h}'
'test/core/util/port_isolated_runtime_environment.cc',
'test/core/util/port_server_client.cc',
'test/core/util/slice_splitter.cc',
'test/core/util/tracer_util.cc',
'test/core/util/trickle_endpoint.cc',
'test/core/end2end/data/ssl_test_data.h',
'test/core/security/oauth2_utils.h',
'test/core/end2end/cq_verifier.h',
'test/core/end2end/fixtures/http_proxy_fixture.h',
'test/core/end2end/fixtures/proxy.h',
'test/core/iomgr/endpoint_tests.h',
'test/core/util/debugger_macros.h',
'test/core/util/grpc_profiler.h',
'test/core/util/histogram.h',
'test/core/util/memory_counters.h',
'test/core/util/mock_endpoint.h',
'test/core/util/parse_hexstring.h',
'test/core/util/passthru_endpoint.h',
'test/core/util/port.h',
'test/core/util/port_server_client.h',
'test/core/util/slice_splitter.h',
'test/core/util/tracer_util.h',
'test/core/util/trickle_endpoint.h',
'test/core/end2end/end2end_tests.cc',
'test/core/end2end/end2end_test_utils.cc',
'test/core/end2end/tests/authority_not_supported.cc',
'test/core/end2end/tests/bad_hostname.cc',
'test/core/end2end/tests/bad_ping.cc',
'test/core/end2end/tests/binary_metadata.cc',
'test/core/end2end/tests/call_creds.cc',
'test/core/end2end/tests/cancel_after_accept.cc',
'test/core/end2end/tests/cancel_after_client_done.cc',
'test/core/end2end/tests/cancel_after_invoke.cc',
'test/core/end2end/tests/cancel_after_round_trip.cc',
'test/core/end2end/tests/cancel_before_invoke.cc',
'test/core/end2end/tests/cancel_in_a_vacuum.cc',
'test/core/end2end/tests/cancel_with_status.cc',
'test/core/end2end/tests/compressed_payload.cc',
'test/core/end2end/tests/connectivity.cc',
'test/core/end2end/tests/default_host.cc',
'test/core/end2end/tests/disappearing_server.cc',
'test/core/end2end/tests/empty_batch.cc',
'test/core/end2end/tests/filter_call_init_fails.cc',
'test/core/end2end/tests/filter_causes_close.cc',
'test/core/end2end/tests/filter_latency.cc',
'test/core/end2end/tests/graceful_server_shutdown.cc',
'test/core/end2end/tests/high_initial_seqno.cc',
'test/core/end2end/tests/hpack_size.cc',
'test/core/end2end/tests/idempotent_request.cc',
'test/core/end2end/tests/invoke_large_request.cc',
'test/core/end2end/tests/keepalive_timeout.cc',
'test/core/end2end/tests/large_metadata.cc',
'test/core/end2end/tests/load_reporting_hook.cc',
'test/core/end2end/tests/max_concurrent_streams.cc',
'test/core/end2end/tests/max_connection_age.cc',
'test/core/end2end/tests/max_connection_idle.cc',
'test/core/end2end/tests/max_message_length.cc',
'test/core/end2end/tests/negative_deadline.cc',
'test/core/end2end/tests/network_status_change.cc',
'test/core/end2end/tests/no_logging.cc',
'test/core/end2end/tests/no_op.cc',
'test/core/end2end/tests/payload.cc',
'test/core/end2end/tests/ping.cc',
'test/core/end2end/tests/ping_pong_streaming.cc',
'test/core/end2end/tests/proxy_auth.cc',
'test/core/end2end/tests/registered_call.cc',
'test/core/end2end/tests/request_with_flags.cc',
'test/core/end2end/tests/request_with_payload.cc',
'test/core/end2end/tests/resource_quota_server.cc',
'test/core/end2end/tests/server_finishes_request.cc',
'test/core/end2end/tests/shutdown_finishes_calls.cc',
'test/core/end2end/tests/shutdown_finishes_tags.cc',
'test/core/end2end/tests/simple_cacheable_request.cc',
'test/core/end2end/tests/simple_delayed_request.cc',
'test/core/end2end/tests/simple_metadata.cc',
'test/core/end2end/tests/simple_request.cc',
'test/core/end2end/tests/stream_compression_compressed_payload.cc',
'test/core/end2end/tests/stream_compression_payload.cc',
'test/core/end2end/tests/stream_compression_ping_pong_streaming.cc',
'test/core/end2end/tests/streaming_error_response.cc',
'test/core/end2end/tests/trailing_metadata.cc',
'test/core/end2end/tests/workaround_cronet_compression.cc',
'test/core/end2end/tests/write_buffering.cc',
'test/core/end2end/tests/write_buffering_at_end.cc',
'test/core/end2end/tests/cancel_test_helpers.h',
'test/core/end2end/end2end_tests.h'
end
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?

@ -22,27 +22,51 @@
# limitations under the License.
<%!
def grpc_private_files(libs):
def grpc_lib_files(libs, expect_libs, groups):
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('headers', [])
out += lib.get('src', [])
return [f for f in out if not f.startswith("third_party/nanopb/")]
if lib.name in expect_libs:
for group in groups:
out += lib.get(group, [])
return out
def grpc_private_files(libs):
out = grpc_lib_files(libs, ("grpc", "gpr"), ("headers", "src"))
return [file for file in out if not file.startswith("third_party/nanopb/")]
def grpc_public_headers(libs):
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
out = grpc_lib_files(libs, ("grpc", "gpr"), ("public_headers",))
return out
def grpc_private_headers(libs):
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('headers', [])
return [f for f in out if not f.startswith("third_party/nanopb/")]
out = grpc_lib_files(libs, ("grpc", "gpr"), ("headers",))
return [file for file in out if not file.startswith("third_party/nanopb/")]
def grpc_cronet_files(libs):
out = grpc_lib_files(libs, ("grpc_cronet",), ("src", "headers"))
excl = grpc_private_files(libs)
excl += [
# We do not need cronet dedicated plugin registry
"src/core/plugin_registry/grpc_cronet_plugin_registry.cc",
# We do not need dummy cronet API for ObjC
"src/core/ext/transport/cronet/transport/cronet_api_dummy.cc",
]
return [file for file in out if not file in excl]
def grpc_cronet_public_headers(libs):
out = grpc_lib_files(libs, ("grpc_cronet",), ("public_headers",))
excl = grpc_public_headers(libs)
return [file for file in out if not file in excl]
def grpc_test_util_files(libs):
out = grpc_lib_files(libs, ("grpc_test_util", "gpr_test_util"), ("src", "headers"))
excl = grpc_private_files(libs)
return [file for file in out if not file in excl]
def end2end_tests_files(libs):
out = grpc_lib_files(libs, ("end2end_tests",), ("src", "headers"))
excl = grpc_private_files(libs)
return [file for file in out if not file in excl]
def ruby_multiline_list(files, indent):
return (',\n' + indent*' ').join('\'%s\'' % f for f in files)
@ -153,7 +177,7 @@
s.subspec 'Cronet-Interface' do |ss|
ss.header_mappings_dir = 'include/grpc'
ss.source_files = 'include/grpc/grpc_cronet.h'
ss.source_files = ${ruby_multiline_list(grpc_cronet_public_headers(libs), 22)}
end
s.subspec 'Cronet-Implementation' do |ss|
@ -163,9 +187,7 @@
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Cronet-Interface", version
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
ss.source_files = ${ruby_multiline_list(grpc_cronet_files(libs), 22)}
end
s.subspec 'Tests' do |ss|
@ -174,17 +196,8 @@
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
ss.source_files = 'test/core/end2end/cq_verifier.{cc,h}',
'test/core/end2end/end2end_tests.{cc,h}',
'test/core/end2end/end2end_test_utils.cc',
'test/core/end2end/tests/*.{cc,h}',
'test/core/end2end/fixtures/*.h',
'test/core/end2end/data/*.{cc,h}',
'test/core/util/debugger_macros.{cc,h}',
'test/core/util/test_config.{cc,h}',
'test/core/util/port.h',
'test/core/util/port.cc',
'test/core/util/port_server_client.{cc,h}'
ss.source_files = ${ruby_multiline_list(grpc_test_util_files(libs), 22)},
${ruby_multiline_list(end2end_tests_files(libs), 22)}
end
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?

Loading…
Cancel
Save