Ray Milkey | 28d77f3 | 2018-07-27 09:21:49 -0700 | [diff] [blame] | 1 | COMPILE_DEPS = CORE_DEPS + KRYO + ATOMIX + [ |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 2 | "//core/common:onos-core-common", |
| 3 | "//core/store/serializers:onos-core-serializers", |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 4 | ] |
| 5 | |
| 6 | TEST_DEPS = TEST + [ |
| 7 | "@commons_math3//jar", |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 8 | "@io_netty_netty_handler//jar", |
| 9 | "@io_netty_netty_buffer//jar", |
| 10 | "@io_netty_netty_codec//jar", |
| 11 | "@io_netty_netty_resolver//jar", |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 12 | "//core/api:onos-api-tests", |
| 13 | ] |
| 14 | |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 15 | _primitive_package_names = [ |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 16 | "barrier", |
| 17 | "collection", |
| 18 | "counter", |
| 19 | "election", |
| 20 | "idgenerator", |
| 21 | "iterator", |
| 22 | "list", |
| 23 | "lock", |
Jordan Halterman | 2b3ed3e | 2018-11-27 14:38:37 -0800 | [diff] [blame^] | 24 | "log", |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 25 | "map", |
| 26 | "multimap", |
| 27 | "multiset", |
| 28 | "queue", |
| 29 | "semaphore", |
| 30 | "set", |
| 31 | "transaction", |
| 32 | "tree", |
| 33 | "value", |
| 34 | "workqueue", |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 35 | ] |
| 36 | |
| 37 | # A list of all core primitive packages for dynamic class loading |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 38 | PRIMITIVE_PACKAGES = ",".join(["io.atomix.primitive.session.impl"] + ["io.atomix.core.{primitive},io.atomix.core.{primitive}.impl".format(primitive = primitive) for primitive in _primitive_package_names]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 39 | |
| 40 | # Base package names for core Atomix protocols |
| 41 | _protocol_package_names = [ |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 42 | "raft", |
| 43 | "backup", |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 44 | ] |
| 45 | |
Jordan Halterman | 28b21d1 | 2018-11-12 11:03:35 -0800 | [diff] [blame] | 46 | # A list of all cluster protocol packages for dynamic class loading |
| 47 | CLUSTER_PACKAGES = ",".join([ |
| 48 | "io.atomix.cluster.discovery", |
| 49 | "io.atomix.cluster.protocol", |
| 50 | ]) |
| 51 | |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 52 | # A list of all core protocol packages for dynamic class loading |
Jordan Halterman | 2b3ed3e | 2018-11-27 14:38:37 -0800 | [diff] [blame^] | 53 | PROTOCOL_PACKAGES = ",".join(["io.atomix.primitive.partition.impl"] + ["io.atomix.protocols.{protocol},io.atomix.protocols.{protocol}.partition".format(protocol = protocol) for protocol in _protocol_package_names]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 54 | |
| 55 | # A list of all additional core packages used in dynamic class loading |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 56 | CORE_PACKAGES = ",".join([ |
| 57 | "io.atomix.core.profile", |
| 58 | "io.atomix.core.profile.impl", |
| 59 | ]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 60 | |
| 61 | # A list of all dynamically loadable Atomix packages |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 62 | INCLUDE_PACKAGES = ",".join([ |
Jordan Halterman | 28b21d1 | 2018-11-12 11:03:35 -0800 | [diff] [blame] | 63 | CLUSTER_PACKAGES, |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 64 | PRIMITIVE_PACKAGES, |
| 65 | PROTOCOL_PACKAGES, |
| 66 | CORE_PACKAGES, |
| 67 | ]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 68 | |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 69 | ALL_PACKAGES = "*" |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 70 | |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 71 | osgi_jar_with_tests( |
| 72 | name = "onos-core-primitives", |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame] | 73 | import_packages = INCLUDE_PACKAGES + "," + ALL_PACKAGES, |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 74 | test_deps = TEST_DEPS, |
| 75 | visibility = ["//visibility:public"], |
| 76 | deps = COMPILE_DEPS, |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 77 | ) |