mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-16 01:41:26 +02:00
Allow building third-party apps based on gRPC
By publishing the repackaged grpc and protobuf artifacts Change-Id: Ib3af7dba4f64948132aa70be31922de61d6f6ab2
This commit is contained in:
parent
1b5c5fadfe
commit
c0b23a459f
@ -1,6 +1,6 @@
|
|||||||
BUNDLES = [
|
BUNDLES = [
|
||||||
"@kafka_clients//jar",
|
"@kafka_clients//jar",
|
||||||
"//protocols/grpc:protobuf-java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"//core/protobuf/models:onos-core-protobuf-models",
|
"//core/protobuf/models:onos-core-protobuf-models",
|
||||||
"//core/protobuf/models/proto:onos-core-protobuf-models-proto",
|
"//core/protobuf/models/proto:onos-core-protobuf-models-proto",
|
||||||
"//apps/kafka-integration/api:onos-apps-kafka-integration-api",
|
"//apps/kafka-integration/api:onos-apps-kafka-integration-api",
|
||||||
|
@ -4,7 +4,7 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
|
|||||||
"@kafka_clients//jar",
|
"@kafka_clients//jar",
|
||||||
"@javax_ws_rs_api//jar",
|
"@javax_ws_rs_api//jar",
|
||||||
"//utils/rest:onlab-rest",
|
"//utils/rest:onlab-rest",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"//core/protobuf/models:onos-core-protobuf-models",
|
"//core/protobuf/models:onos-core-protobuf-models",
|
||||||
"//core/protobuf/models/proto:onos-core-protobuf-models-proto",
|
"//core/protobuf/models/proto:onos-core-protobuf-models-proto",
|
||||||
]
|
]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + JACKSON + [
|
COMPILE_DEPS = CORE_DEPS + JACKSON + [
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"//core/store/serializers:onos-core-serializers",
|
"//core/store/serializers:onos-core-serializers",
|
||||||
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
||||||
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
||||||
|
@ -16,13 +16,13 @@ BUNDLES = [
|
|||||||
"@simpleclient_hotspot//jar",
|
"@simpleclient_hotspot//jar",
|
||||||
"@simpleclient_servlet//jar",
|
"@simpleclient_servlet//jar",
|
||||||
# gRPC dependencies (with patched core)
|
# gRPC dependencies (with patched core)
|
||||||
"//protocols/grpc:grpc-core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"//protocols/grpc:grpc-stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"//protocols/grpc:grpc-netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"//protocols/grpc:grpc-auth",
|
"//lib:io_grpc_grpc_auth",
|
||||||
"//protocols/grpc:grpc-protobuf",
|
"//lib:io_grpc_grpc_protobuf",
|
||||||
"//protocols/grpc:grpc-protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"//protocols/grpc:protobuf-java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
"@com_google_errorprone_error_prone_annotations//jar",
|
"@com_google_errorprone_error_prone_annotations//jar",
|
||||||
"@com_google_auth_google_auth_library_credentials//jar",
|
"@com_google_auth_google_auth_library_credentials//jar",
|
||||||
|
@ -12,8 +12,8 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + REST + [
|
|||||||
"@jetty_util//jar",
|
"@jetty_util//jar",
|
||||||
"@jetty_websocket//jar",
|
"@jetty_websocket//jar",
|
||||||
"@servlet_api//jar",
|
"@servlet_api//jar",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"//core/store/serializers:onos-core-serializers",
|
"//core/store/serializers:onos-core-serializers",
|
||||||
"//apps/openstacknode/api:onos-apps-openstacknode-api",
|
"//apps/openstacknode/api:onos-apps-openstacknode-api",
|
||||||
"//apps/openstacknetworking/api:onos-apps-openstacknetworking-api",
|
"//apps/openstacknetworking/api:onos-apps-openstacknetworking-api",
|
||||||
|
@ -4,8 +4,8 @@ COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + [
|
|||||||
"//pipelines/basic:onos-pipelines-basic",
|
"//pipelines/basic:onos-pipelines-basic",
|
||||||
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
||||||
"//protocols/p4runtime/model:onos-protocols-p4runtime-model",
|
"//protocols/p4runtime/model:onos-protocols-p4runtime-model",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@minimal_json//jar",
|
"@minimal_json//jar",
|
||||||
# "//protocols/bmv2/thrift-api:onos-protocols-bmv2-thrift-api",
|
# "//protocols/bmv2/thrift-api:onos-protocols-bmv2-thrift-api",
|
||||||
#"//lib:libthrift",
|
#"//lib:libthrift",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + KRYO + [
|
COMPILE_DEPS = CORE_DEPS + KRYO + [
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"//core/store/serializers:onos-core-serializers",
|
"//core/store/serializers:onos-core-serializers",
|
||||||
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
||||||
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + KRYO + [
|
COMPILE_DEPS = CORE_DEPS + KRYO + [
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"//protocols/gnoi/stub:onos-protocols-gnoi-stub",
|
"//protocols/gnoi/stub:onos-protocols-gnoi-stub",
|
||||||
"//protocols/gnoi/api:onos-protocols-gnoi-api",
|
"//protocols/gnoi/api:onos-protocols-gnoi-api",
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
|
@ -3,7 +3,7 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [
|
|||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"//protocols/grpc/utils:onos-protocols-grpc-utils",
|
"//protocols/grpc/utils:onos-protocols-grpc-utils",
|
||||||
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
]
|
]
|
||||||
|
|
||||||
BUNDLES = [
|
BUNDLES = [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + [
|
COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + [
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"//drivers/p4runtime:onos-drivers-p4runtime",
|
"//drivers/p4runtime:onos-drivers-p4runtime",
|
||||||
"//drivers/gnmi:onos-drivers-gnmi",
|
"//drivers/gnmi:onos-drivers-gnmi",
|
||||||
"//drivers/gnoi:onos-drivers-gnoi",
|
"//drivers/gnoi:onos-drivers-gnoi",
|
||||||
|
66
lib/BUILD
Normal file
66
lib/BUILD
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar")
|
||||||
|
|
||||||
|
# Wrap protobuf and grpc-related JARs in OSGi-compatible ones, since the
|
||||||
|
# original ones are built with Bazel and NOT imported via mvn.
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
# Differently from the official "grpc-core" package, here we also include
|
||||||
|
# "grpc-context" to solve the OSGI split-brain problem:
|
||||||
|
# https://github.com/grpc/grpc-java/issues/2727
|
||||||
|
# We use patched Bazel BUILD files to package together core and context (see
|
||||||
|
# tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a
|
||||||
|
# compile-time dependency, please use this one.
|
||||||
|
name = "io_grpc_grpc_core_context",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//core",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "io_grpc_grpc_stub",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//stub",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "io_grpc_grpc_netty",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//netty",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "io_grpc_grpc_auth",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//auth",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "io_grpc_grpc_protobuf",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//protobuf",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "io_grpc_grpc_protobuf_lite",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@io_grpc_grpc_java//protobuf-lite",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
wrapped_osgi_jar(
|
||||||
|
name = "com_google_protobuf_protobuf_java",
|
||||||
|
generate_pom = True,
|
||||||
|
jar = "@com_google_protobuf//:protobuf_java",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [],
|
||||||
|
)
|
@ -3,18 +3,18 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [
|
|||||||
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
||||||
"//protocols/grpc:grpc-core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_DEPS = TEST + [
|
TEST_DEPS = TEST + [
|
||||||
"@minimal_json//jar",
|
"@minimal_json//jar",
|
||||||
"@io_grpc_grpc_java//core:inprocess",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
osgi_jar_with_tests(
|
osgi_jar_with_tests(
|
||||||
|
@ -3,18 +3,18 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [
|
|||||||
"//protocols/gnoi/stub:onos-protocols-gnoi-stub",
|
"//protocols/gnoi/stub:onos-protocols-gnoi-stub",
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
||||||
"//protocols/grpc:grpc-core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_DEPS = TEST + [
|
TEST_DEPS = TEST + [
|
||||||
"@minimal_json//jar",
|
"@minimal_json//jar",
|
||||||
"@io_grpc_grpc_java//core:inprocess",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
osgi_jar_with_tests(
|
osgi_jar_with_tests(
|
||||||
|
@ -1,19 +1,15 @@
|
|||||||
load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar")
|
|
||||||
load("//tools/build/bazel:variables.bzl", "GRPC_JAVA_VERSION")
|
|
||||||
load("//tools/build/bazel:variables.bzl", "PROTOBUF_VERSION")
|
|
||||||
|
|
||||||
BUNDLES = [
|
BUNDLES = [
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
||||||
"//protocols/grpc/utils:onos-protocols-grpc-utils",
|
"//protocols/grpc/utils:onos-protocols-grpc-utils",
|
||||||
# gRPC dependencies (with patched core)
|
# gRPC dependencies (with patched core)
|
||||||
":grpc-core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
":grpc-stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
":grpc-netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
":grpc-auth",
|
"//lib:io_grpc_grpc_auth",
|
||||||
":grpc-protobuf",
|
"//lib:io_grpc_grpc_protobuf",
|
||||||
":grpc-protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
":protobuf-java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
"@com_google_errorprone_error_prone_annotations//jar",
|
"@com_google_errorprone_error_prone_annotations//jar",
|
||||||
"@com_google_auth_google_auth_library_credentials//jar",
|
"@com_google_auth_google_auth_library_credentials//jar",
|
||||||
@ -30,83 +26,3 @@ onos_app(
|
|||||||
title = "gRPC Protocol Subsystem",
|
title = "gRPC Protocol Subsystem",
|
||||||
url = "ttp://onosproject.org",
|
url = "ttp://onosproject.org",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wrap protobuf and grpc-related JARs in OSGi-compatible ones, since the
|
|
||||||
# original ones are built with Bazel and NOT imported via mvn.
|
|
||||||
|
|
||||||
# FIXME: consider moving these rules somewhere else as other apps depend on it
|
|
||||||
# (e.g. openstacktelemetry and kafka-integration) but they don't directly
|
|
||||||
# depend on any onos-protocols-grpc-* module.
|
|
||||||
|
|
||||||
GRPC_GROUP_ID = "io.grpc"
|
|
||||||
|
|
||||||
PROTOBUF_GROUP_ID = "com.google.protobuf"
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
# Differently from the official "grpc-core" package, here we also include
|
|
||||||
# "grpc-context" to solve the OSGI split-brain problem:
|
|
||||||
# https://github.com/grpc/grpc-java/issues/2727
|
|
||||||
# We use patched Bazel BUILD files to package together core and context (see
|
|
||||||
# tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a
|
|
||||||
# compile-time dependency, please use this one.
|
|
||||||
name = "grpc-core",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//core",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "grpc-stub",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//stub",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "grpc-netty",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//netty",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "grpc-auth",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//auth",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "grpc-protobuf",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//protobuf",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "grpc-protobuf-lite",
|
|
||||||
group = GRPC_GROUP_ID,
|
|
||||||
jar = "@io_grpc_grpc_java//protobuf-lite",
|
|
||||||
version = GRPC_JAVA_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
wrapped_osgi_jar(
|
|
||||||
name = "protobuf-java",
|
|
||||||
group = PROTOBUF_GROUP_ID,
|
|
||||||
jar = "@com_google_protobuf//:protobuf_java",
|
|
||||||
version = PROTOBUF_VERSION,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [],
|
|
||||||
)
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
osgi_jar(
|
osgi_jar(
|
||||||
deps = CORE_DEPS + ["@io_grpc_grpc_java//core"],
|
deps = CORE_DEPS + ["//lib:io_grpc_grpc_core_context"],
|
||||||
)
|
)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + [
|
COMPILE_DEPS = CORE_DEPS + [
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
"@io_netty_netty_handler//jar",
|
"@io_netty_netty_handler//jar",
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + [
|
COMPILE_DEPS = CORE_DEPS + [
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
]
|
]
|
||||||
|
|
||||||
osgi_jar(
|
osgi_jar(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + [
|
COMPILE_DEPS = CORE_DEPS + [
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_DEPS = TEST + [
|
TEST_DEPS = TEST + [
|
||||||
|
@ -4,18 +4,18 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [
|
|||||||
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
|
||||||
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
|
||||||
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
|
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"//protocols/grpc:grpc-core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//netty",
|
"//lib:io_grpc_grpc_netty",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"@com_google_api_grpc_proto_google_common_protos//jar",
|
"@com_google_api_grpc_proto_google_common_protos//jar",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_DEPS = TEST + [
|
TEST_DEPS = TEST + [
|
||||||
"@minimal_json//jar",
|
"@minimal_json//jar",
|
||||||
"@io_grpc_grpc_java//core:inprocess",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//protobuf-lite",
|
"//lib:io_grpc_grpc_protobuf_lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
osgi_jar_with_tests(
|
osgi_jar_with_tests(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + [
|
COMPILE_DEPS = CORE_DEPS + [
|
||||||
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
|
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
]
|
]
|
||||||
|
|
||||||
osgi_jar_with_tests(
|
osgi_jar_with_tests(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
COMPILE_DEPS = CORE_DEPS + JACKSON + [
|
COMPILE_DEPS = CORE_DEPS + JACKSON + [
|
||||||
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
"//protocols/gnmi/stub:onos-protocols-gnmi-stub",
|
||||||
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
"//protocols/gnmi/api:onos-protocols-gnmi-api",
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
"//protocols/grpc/api:onos-protocols-grpc-api",
|
"//protocols/grpc/api:onos-protocols-grpc-api",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
load("//tools/build/bazel:variables.bzl", "GRPC_JAVA_VERSION")
|
|
||||||
|
|
||||||
GRPC_VER = "1.18.0"
|
GRPC_JAVA_VERSION = "1.18.0"
|
||||||
GRPC_SHA = "979cd1873c0f3aefa25f3d20336c023ce34471203bf2d954ad9e3158fc55c16b"
|
GRPC_SHA = "979cd1873c0f3aefa25f3d20336c023ce34471203bf2d954ad9e3158fc55c16b"
|
||||||
|
|
||||||
GAPIS_COMMIT = "37cc0e5acae50ee91f00827a7010c3b07dfa5311"
|
GAPIS_COMMIT = "37cc0e5acae50ee91f00827a7010c3b07dfa5311"
|
||||||
|
@ -364,7 +364,8 @@ def wrapped_osgi_jar(
|
|||||||
version = ONOS_VERSION,
|
version = ONOS_VERSION,
|
||||||
group = "org.onosproject",
|
group = "org.onosproject",
|
||||||
import_packages = "*",
|
import_packages = "*",
|
||||||
visibility = ["//visibility:private"]):
|
visibility = ["//visibility:private"],
|
||||||
|
generate_pom = False):
|
||||||
_bnd(
|
_bnd(
|
||||||
name = name,
|
name = name,
|
||||||
source = jar,
|
source = jar,
|
||||||
@ -376,6 +377,14 @@ def wrapped_osgi_jar(
|
|||||||
web_xml = None,
|
web_xml = None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if generate_pom:
|
||||||
|
pom_file(
|
||||||
|
name = name + "-pom",
|
||||||
|
artifact = name,
|
||||||
|
deps = deps,
|
||||||
|
visibility = visibility,
|
||||||
|
)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Creates an OSGI jar and test jar file from a set of source and test files.
|
Creates an OSGI jar and test jar file from a set of source and test files.
|
||||||
See osgi_jar() for a description of shared parameters.
|
See osgi_jar() for a description of shared parameters.
|
||||||
@ -698,7 +707,7 @@ def osgi_proto_jar(
|
|||||||
":%s-proto-srcjar" % name,
|
":%s-proto-srcjar" % name,
|
||||||
]
|
]
|
||||||
base_deps = [
|
base_deps = [
|
||||||
"@com_google_protobuf//:protobuf_java",
|
"//lib:com_google_protobuf_protobuf_java",
|
||||||
]
|
]
|
||||||
if grpc_proto_lib != None:
|
if grpc_proto_lib != None:
|
||||||
java_grpc_library(
|
java_grpc_library(
|
||||||
@ -711,9 +720,9 @@ def osgi_proto_jar(
|
|||||||
)
|
)
|
||||||
base_deps.extend([
|
base_deps.extend([
|
||||||
"@com_google_guava_guava//jar",
|
"@com_google_guava_guava//jar",
|
||||||
"@io_grpc_grpc_java//core",
|
"//lib:io_grpc_grpc_core_context",
|
||||||
"@io_grpc_grpc_java//stub",
|
"//lib:io_grpc_grpc_stub",
|
||||||
"@io_grpc_grpc_java//protobuf",
|
"//lib:io_grpc_grpc_protobuf",
|
||||||
])
|
])
|
||||||
osgi_jar(
|
osgi_jar(
|
||||||
name = name,
|
name = name,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
load("//tools/build/bazel:variables.bzl", "PROTOBUF_VERSION")
|
|
||||||
|
|
||||||
|
PROTOBUF_VERSION = "3.6.1.3"
|
||||||
SHA = "9510dd2afc29e7245e9e884336f848c8a6600a14ae726adb6befdb4f786f0be2"
|
SHA = "9510dd2afc29e7245e9e884336f848c8a6600a14ae726adb6befdb4f786f0be2"
|
||||||
|
|
||||||
def generate_protobuf():
|
def generate_protobuf():
|
||||||
|
@ -4,6 +4,3 @@ ONOS_GROUP_ID = "org.onosproject"
|
|||||||
ONOS_ORIGIN = "ONOS Community"
|
ONOS_ORIGIN = "ONOS Community"
|
||||||
APP_PREFIX = ONOS_GROUP_ID + "."
|
APP_PREFIX = ONOS_GROUP_ID + "."
|
||||||
DEFAULT_APP_CATEGORY = "Utility"
|
DEFAULT_APP_CATEGORY = "Utility"
|
||||||
|
|
||||||
GRPC_JAVA_VERSION = "1.18.0"
|
|
||||||
PROTOBUF_VERSION = "3.6.1.3"
|
|
||||||
|
@ -33,6 +33,14 @@ function jars {
|
|||||||
egrep -v '(\#|build/conf)' tools/build/publish-target-list
|
egrep -v '(\#|build/conf)' tools/build/publish-target-list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sourceJars {
|
||||||
|
egrep -v '(\#|lib\:|p4runtime/proto|build/conf)' tools/build/publish-target-list
|
||||||
|
}
|
||||||
|
|
||||||
|
function javadocJars {
|
||||||
|
egrep -v '(\#|lib\:|p4runtime/proto|build/conf)' tools/build/publish-target-list
|
||||||
|
}
|
||||||
|
|
||||||
function testJars {
|
function testJars {
|
||||||
egrep -v '(\#|build/conf)' tools/build/publish-test-target-list
|
egrep -v '(\#|build/conf)' tools/build/publish-test-target-list
|
||||||
}
|
}
|
||||||
@ -46,9 +54,9 @@ writeCatalog $(testJars)
|
|||||||
[ $libsOnly = true ] && exit 0
|
[ $libsOnly = true ] && exit 0
|
||||||
|
|
||||||
echo "Cataloging source jars..."
|
echo "Cataloging source jars..."
|
||||||
writeCatalog $(jars | sed 's/$/-sources/')
|
writeCatalog $(sourceJars | sed 's/$/-sources/')
|
||||||
echo "Cataloging javadoc jars..."
|
echo "Cataloging javadoc jars..."
|
||||||
writeCatalog $(jars | sed 's/$/-javadoc/')
|
writeCatalog $(javadocJars | sed 's/$/-javadoc/')
|
||||||
echo "Cataloging pom files..."
|
echo "Cataloging pom files..."
|
||||||
writeCatalog $(jars | sed 's/$/-pom/')
|
writeCatalog $(jars | sed 's/$/-pom/')
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
//protocols/grpc/api:onos-protocols-grpc-api
|
//protocols/grpc/api:onos-protocols-grpc-api
|
||||||
//protocols/p4runtime/api:onos-protocols-p4runtime-api
|
//protocols/p4runtime/api:onos-protocols-p4runtime-api
|
||||||
//protocols/p4runtime/model:onos-protocols-p4runtime-model
|
//protocols/p4runtime/model:onos-protocols-p4runtime-model
|
||||||
|
//protocols/p4runtime/proto:onos-protocols-p4runtime-proto
|
||||||
//protocols/grpc/utils:onos-protocols-grpc-utils
|
//protocols/grpc/utils:onos-protocols-grpc-utils
|
||||||
//protocols/gnmi/api:onos-protocols-gnmi-api
|
//protocols/gnmi/api:onos-protocols-gnmi-api
|
||||||
//protocols/gnoi/api:onos-protocols-gnoi-api
|
//protocols/gnoi/api:onos-protocols-gnoi-api
|
||||||
@ -45,3 +46,7 @@
|
|||||||
//utils/osgi:onlab-osgi
|
//utils/osgi:onlab-osgi
|
||||||
//utils/rest:onlab-rest
|
//utils/rest:onlab-rest
|
||||||
//web/api:onos-rest
|
//web/api:onos-rest
|
||||||
|
//lib:com_google_protobuf_protobuf_java
|
||||||
|
//lib:io_grpc_grpc_core_context
|
||||||
|
//lib:io_grpc_grpc_stub
|
||||||
|
//lib:io_grpc_grpc_protobuf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user