blob: 7179dc9283c34bd6fa9ee00bea571da62a0f353e [file] [log] [blame]
Aaron Kruglikove630fb12017-04-24 13:05:26 -07001include_defs('//bucklets/grpc.bucklet')
2
Carmelo Cascone1d5fc722017-06-27 19:34:25 -04003fetch_grpc_plugin(version = '1.3.0')
4
5# Repackaging of gRPC 1.3.0 to solve the OSGI split package issue.
6# If bumping the gRPC version, please write a new rule.
7
8def grpc_core_repkg_130():
9 repkg_deps = [
10 '//lib:COMPILE',
11 '//lib:google-instrumentation-0.3.0',
12 "//lib:google-errorprone-2.0.19"
13 ]
14 remote_file(
15 name = "grpc-src-zip-130",
16 url = "https://github.com/grpc/grpc-java/archive/v1.3.0.zip",
17 sha1 = "aae4368c7e4c4666236238e31be3a529e153cc02",
18 )
19 srcs = []
20 for pkg in ['core', 'context']:
21 name = 'grpc-' + pkg + '-130'
22 genrule(
23 name = name,
24 bash = 'jar xf $(location :grpc-src-zip-130) grpc-java-1.3.0/' + pkg + '/src/main/java '
25 + '&& cd grpc-java-1.3.0/' + pkg + '/src/main/java '
26 + '&& jar -cf $OUT *',
27 out = pkg + '.src.zip',
28 )
29 srcs.append(':' + name)
30 osgi_jar(
31 name = 'grpc-core-repkg-1.3.0',
32 srcs = srcs,
33 deps = repkg_deps,
34 package_name_root = 'io.grpc',
35 import_packages = '!javax.annotation,!com.google.errorprone.annotations,*',
36 export_packages = '*',
37 do_javadocs = False,
38 do_checkstyle = False,
39 )
40
41grpc_core_repkg_130()