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", |
| 4 | "//incubator/api:onos-incubator-api", |
| 5 | ] |
| 6 | |
| 7 | TEST_DEPS = TEST + [ |
| 8 | "@commons_math3//jar", |
| 9 | "@netty_handler//jar", |
| 10 | "@netty_buffer//jar", |
| 11 | "@netty_codec//jar", |
| 12 | "@netty_resolver//jar", |
| 13 | "//core/api:onos-api-tests", |
| 14 | ] |
| 15 | |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 16 | _primitive_package_names = [ |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 17 | "barrier", |
| 18 | "collection", |
| 19 | "counter", |
| 20 | "election", |
| 21 | "idgenerator", |
| 22 | "iterator", |
| 23 | "list", |
| 24 | "lock", |
| 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 | |
| 46 | # A list of all core protocol packages for dynamic class loading |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 47 | 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] + ["io.atomix.protocols.gossip"]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 48 | |
| 49 | # A list of all additional core packages used in dynamic class loading |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 50 | CORE_PACKAGES = ",".join([ |
| 51 | "io.atomix.core.profile", |
| 52 | "io.atomix.core.profile.impl", |
| 53 | ]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 54 | |
| 55 | # A list of all dynamically loadable Atomix packages |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 56 | INCLUDE_PACKAGES = ",".join([ |
| 57 | PRIMITIVE_PACKAGES, |
| 58 | PROTOCOL_PACKAGES, |
| 59 | CORE_PACKAGES, |
| 60 | ]) |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 61 | |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 62 | ALL_PACKAGES = "*" |
Ray Milkey | 644fdbf | 2018-07-27 15:24:31 -0700 | [diff] [blame] | 63 | |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 64 | osgi_jar_with_tests( |
| 65 | name = "onos-core-primitives", |
Jian Li | d486a73 | 2018-08-03 00:32:11 +0900 | [diff] [blame^] | 66 | import_packages = INCLUDE_PACKAGES + "," + ALL_PACKAGES, |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 67 | test_deps = TEST_DEPS, |
| 68 | visibility = ["//visibility:public"], |
| 69 | deps = COMPILE_DEPS, |
Ray Milkey | 324af93 | 2018-06-20 19:50:31 -0700 | [diff] [blame] | 70 | ) |