blob: a75dd90ed90fdced40e32565113943ac9c6b427d [file] [log] [blame]
Carmelo Cascone72893b72018-08-09 00:59:06 -07001workspace(name = "org_onosproject_onos")
Ray Milkey6b3775a2018-06-28 11:18:44 -07002
Thomas Vachuska46848a82018-08-13 14:32:05 -07003load("//tools/build/bazel:bazel_version.bzl", "check_bazel_version")
Ray Milkey5063f5b2018-08-15 16:22:30 -07004
Thomas Vachuska46848a82018-08-13 14:32:05 -07005check_bazel_version()
6
Thomas Vachuskac4d03772018-11-26 10:53:58 -08007load("//tools/build/bazel:local_jar.bzl", "local_atomix", "local_jar", "local_yang_tools")
Thomas Vachuska9379a072018-08-21 14:19:02 -07008
9# Use this to build against locally built arbitrary 3rd party artifacts
10#local_jar(
11# name = "atomix",
Thomas Vachuskad389a6e2018-10-29 15:17:17 -070012# path = "/Users/tom/atomix/core/target/atomix-3.0.8-SNAPSHOT.jar",
Thomas Vachuska9379a072018-08-21 14:19:02 -070013#)
14
15# Use this to build against locally built Atomix
16#local_atomix(
Thomas Vachuskad389a6e2018-10-29 15:17:17 -070017# path = "/Users/tom/atomix",
18# version = "3.0.8-SNAPSHOT",
Thomas Vachuska9379a072018-08-21 14:19:02 -070019#)
20
Thomas Vachuskac4d03772018-11-26 10:53:58 -080021# Use this to build against locally built YANG tools
22#local_yang_tools(
23# path = "/Users/andrea/onos-yang-tools",
24# version = "2.6-SNAPSHOT",
25#)
26
Carmelo Cascone72893b72018-08-09 00:59:06 -070027load("//tools/build/bazel:generate_workspace.bzl", "generated_maven_jars")
Ray Milkey5063f5b2018-08-15 16:22:30 -070028
Ray Milkey7dac7da2017-08-01 16:56:05 -070029generated_maven_jars()
Carmelo Cascone72893b72018-08-09 00:59:06 -070030
31load("//tools/build/bazel:protobuf_workspace.bzl", "generate_protobuf")
Ray Milkey5063f5b2018-08-15 16:22:30 -070032
Carmelo Cascone72893b72018-08-09 00:59:06 -070033generate_protobuf()
34
Carmelo Casconeb9536692019-05-28 18:15:23 -070035load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
36
37protobuf_deps()
38
Carmelo Cascone72893b72018-08-09 00:59:06 -070039load("//tools/build/bazel:grpc_workspace.bzl", "generate_grpc")
Ray Milkey5063f5b2018-08-15 16:22:30 -070040
Ray Milkey30773582018-07-26 15:52:23 -070041generate_grpc()
Ray Milkey7dac7da2017-08-01 16:56:05 -070042
Carmelo Cascone72893b72018-08-09 00:59:06 -070043load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
Carmelo Cascone72893b72018-08-09 00:59:06 -070044
Carmelo Casconeb9536692019-05-28 18:15:23 -070045# We omit as many dependencies as we can and instead import the same via
46# deps.json, so they get wrapped properly for Karaf runtime.
Ray Milkey5063f5b2018-08-15 16:22:30 -070047grpc_java_repositories(
Carmelo Casconeb9536692019-05-28 18:15:23 -070048 omit_bazel_skylib = False,
49 omit_com_google_android_annotations = False,
Carmelo Cascone6a1ae712018-08-10 12:19:47 -070050 omit_com_google_api_grpc_google_common_protos = True,
Carmelo Cascone6a1ae712018-08-10 12:19:47 -070051 omit_com_google_auth_google_auth_library_credentials = True,
Carmelo Casconeef478a62019-01-29 18:45:22 -080052 omit_com_google_auth_google_auth_library_oauth2_http = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070053 omit_com_google_code_findbugs_jsr305 = True,
54 omit_com_google_code_gson = True,
Ray Milkey5063f5b2018-08-15 16:22:30 -070055 omit_com_google_errorprone_error_prone_annotations = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070056 omit_com_google_guava = True,
Carmelo Casconeb9536692019-05-28 18:15:23 -070057 omit_com_google_guava_failureaccess = False,
Carmelo Casconeef478a62019-01-29 18:45:22 -080058 omit_com_google_j2objc_j2objc_annotations = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070059 omit_com_google_protobuf = True,
60 omit_com_google_protobuf_javalite = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070061 omit_com_google_truth_truth = True,
62 omit_com_squareup_okhttp = True,
63 omit_com_squareup_okio = True,
Carmelo Casconeb9536692019-05-28 18:15:23 -070064 omit_io_grpc_grpc_proto = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070065 omit_io_netty_buffer = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070066 omit_io_netty_codec = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070067 omit_io_netty_codec_http = True,
68 omit_io_netty_codec_http2 = True,
Ray Milkey5063f5b2018-08-15 16:22:30 -070069 omit_io_netty_codec_socks = True,
70 omit_io_netty_common = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070071 omit_io_netty_handler = True,
72 omit_io_netty_handler_proxy = True,
73 omit_io_netty_resolver = True,
74 omit_io_netty_tcnative_boringssl_static = True,
Ray Milkey5063f5b2018-08-15 16:22:30 -070075 omit_io_netty_transport = True,
76 omit_io_opencensus_api = True,
77 omit_io_opencensus_grpc_metrics = True,
Carmelo Casconecf6a8282019-07-14 20:01:51 -070078 omit_io_perfmark = True,
Carmelo Casconeb9536692019-05-28 18:15:23 -070079 omit_javax_annotation = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070080 omit_junit_junit = True,
Carmelo Casconeb9536692019-05-28 18:15:23 -070081 omit_net_zlib = True,
Ray Milkey5063f5b2018-08-15 16:22:30 -070082 omit_org_apache_commons_lang3 = True,
Ray Milkeyefb6cc52019-04-24 13:45:18 -070083 omit_org_codehaus_mojo_animal_sniffer_annotations = True,
Carmelo Cascone72893b72018-08-09 00:59:06 -070084)
85
Carmelo Cascone72893b72018-08-09 00:59:06 -070086load("//tools/build/bazel:p4lang_workspace.bzl", "generate_p4lang")
Carmelo Cascone72893b72018-08-09 00:59:06 -070087
Ray Milkey5063f5b2018-08-15 16:22:30 -070088generate_p4lang()
Carmelo Cascone72893b72018-08-09 00:59:06 -070089
Yi Tsenge671fc92018-10-31 15:34:30 -070090load("//tools/build/bazel:gnmi_workspace.bzl", "generate_gnmi")
91
92generate_gnmi()
93
oleksandr.yashchuk@plvision.eu3dbcaaf2019-03-13 14:44:46 +020094load("//tools/build/bazel:gnoi_workspace.bzl", "generate_gnoi")
95
96generate_gnoi()
97
Ray Milkey973d11e2018-12-13 15:55:08 -080098load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
99
Ray Milkey6b3775a2018-06-28 11:18:44 -0700100git_repository(
Carmelo Cascone72893b72018-08-09 00:59:06 -0700101 name = "build_bazel_rules_nodejs",
Ray Milkeybca5d0c2019-04-30 11:03:37 -0700102 commit = "70406e05de721520ca568a17186de73e972d7651",
Carmelo Cascone72893b72018-08-09 00:59:06 -0700103 remote = "https://github.com/bazelbuild/rules_nodejs.git",
Ray Milkeybca5d0c2019-04-30 11:03:37 -0700104 shallow_since = "1551145517 -0800",
Ray Milkey6b3775a2018-06-28 11:18:44 -0700105)
106
107load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
Ray Milkey5063f5b2018-08-15 16:22:30 -0700108
Sean Condon2f1fb8d2018-08-31 16:05:02 +0100109node_repositories(
110 node_version = "8.11.1",
111 package_json = ["//tools/gui:package.json"],
112)
Ray Milkey6b3775a2018-06-28 11:18:44 -0700113
Ray Milkey5063f5b2018-08-15 16:22:30 -0700114load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
115
116# buildifier is written in Go and hence needs rules_go to be built.
117# See https://github.com/bazelbuild/rules_go for the up to date setup instructions.
118http_archive(
119 name = "io_bazel_rules_go",
Carmelo Cascone21eb0422019-06-17 12:00:33 -0700120 sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
121 urls = [
122 "https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
123 ],
Ray Milkey5063f5b2018-08-15 16:22:30 -0700124)
125
Carmelo Cascone21eb0422019-06-17 12:00:33 -0700126load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
127
128go_rules_dependencies()
129
130go_register_toolchains()
131
Ray Milkey5063f5b2018-08-15 16:22:30 -0700132http_archive(
133 name = "com_github_bazelbuild_buildtools",
Ray Milkeybca5d0c2019-04-30 11:03:37 -0700134 sha256 = "e0b5b400cfef17d65886365dc7289cb4ef8dfe07066165607413a271a32aa2a4",
Ray Milkeye7b7c692018-12-11 10:41:25 -0800135 strip_prefix = "buildtools-db073457c5a56d810e46efc18bb93a4fd7aa7b5e",
136 url = "https://github.com/bazelbuild/buildtools/archive/db073457c5a56d810e46efc18bb93a4fd7aa7b5e.zip",
Ray Milkey5063f5b2018-08-15 16:22:30 -0700137)
138
Ray Milkey5063f5b2018-08-15 16:22:30 -0700139load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
140
Ray Milkey5063f5b2018-08-15 16:22:30 -0700141buildifier_dependencies()