blob: 99d74ccaab5631bd2cce860341040f0071b66f1f [file] [log] [blame]
Aaron Kruglikove630fb12017-04-24 13:05:26 -07001include_defs('//bucklets/grpc.bucklet')
2
Carmelo Casconeb1936bd2017-12-12 14:42:27 -08003fetch_grpc_plugin(version = '1.3.1')
Carmelo Cascone1d5fc722017-06-27 19:34:25 -04004
Carmelo Casconeb1936bd2017-12-12 14:42:27 -08005# Repackaging of gRPC 1.3.* to solve the OSGI split package issue.
Carmelo Cascone1d5fc722017-06-27 19:34:25 -04006# If bumping the gRPC version, please write a new rule.
7
Carmelo Casconeb1936bd2017-12-12 14:42:27 -08008def grpc_core_repkg_131():
Carmelo Cascone1d5fc722017-06-27 19:34:25 -04009 repkg_deps = [
10 '//lib:COMPILE',
11 '//lib:google-instrumentation-0.3.0',
Carmelo Cascone72893b72018-08-09 00:59:06 -070012 '//lib:google-errorprone-2.0.19'
Carmelo Cascone1d5fc722017-06-27 19:34:25 -040013 ]
14 remote_file(
Carmelo Casconeb1936bd2017-12-12 14:42:27 -080015 name = "grpc-src-zip-131",
16 url = "https://github.com/grpc/grpc-java/archive/v1.3.1.zip",
17 sha1 = "03dc21440fdfa920aa0e905da17df35b0d6c9a44",
Carmelo Cascone1d5fc722017-06-27 19:34:25 -040018 )
19 srcs = []
20 for pkg in ['core', 'context']:
21 name = 'grpc-' + pkg + '-130'
22 genrule(
23 name = name,
Carmelo Casconeb1936bd2017-12-12 14:42:27 -080024 bash = 'jar xf $(location :grpc-src-zip-131) grpc-java-1.3.1/' + pkg + '/src/main/java '
25 + '&& cd grpc-java-1.3.1/' + pkg + '/src/main/java '
Carmelo Cascone1d5fc722017-06-27 19:34:25 -040026 + '&& jar -cf $OUT *',
27 out = pkg + '.src.zip',
28 )
29 srcs.append(':' + name)
30 osgi_jar(
Carmelo Casconeb1936bd2017-12-12 14:42:27 -080031 name = 'grpc-core-repkg-1.3.1',
Carmelo Cascone1d5fc722017-06-27 19:34:25 -040032 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
Carmelo Casconeb1936bd2017-12-12 14:42:27 -080041grpc_core_repkg_131()