Skip to content
Permalink
Browse files

Update third-party dependencies

  • Loading branch information...
JoeHegarty committed Oct 29, 2019
1 parent 7b519f2 commit 2eb99f9714e9fb83b23ff7e2b94ac6c0b73d51d8
@@ -9,10 +9,10 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper

// Shared dependencies
val grpcVersion by extra("1.23.0")
val grpcVersion by extra("1.24.1")
val grpcKotlinVersion by extra("0.1.1")
val protobufVersion by extra("3.9.1")
val kotlinCoroutinesVersion by extra("1.3.1")
val protobufVersion by extra("3.10.0")
val kotlinCoroutinesVersion by extra("1.3.2")
val slf4jVersion by extra("1.7.26")

// Publishing info
@@ -5,6 +5,7 @@
*/
val kotlinCoroutinesVersion = project.rootProject.ext["kotlinCoroutinesVersion"]
val slf4jVersion = project.rootProject.ext["slf4jVersion"]
val jacksonVersion = "2.10.0"

plugins {
kotlin("jvm")
@@ -19,10 +20,10 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:$kotlinCoroutinesVersion")

implementation("com.fasterxml.jackson.core:jackson-databind:2.10.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.10.0")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")

implementation("io.github.classgraph:classgraph:4.8.47")
implementation("io.github.classgraph:classgraph:4.8.52")


testImplementation(project(":src:orbit-server"))
@@ -4,7 +4,6 @@
See license in LICENSE.
*/
val grpcVersion = project.rootProject.ext["grpcVersion"]
val guavaVersion = "28.1"

plugins {
kotlin("jvm")
@@ -17,6 +16,6 @@ dependencies {
implementation(project(":src:orbit-proto"))

implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
implementation("org.jgrapht:jgrapht-core:1.3.0")
implementation("org.jgrapht:jgrapht-core:1.3.1")

}
@@ -114,6 +114,11 @@ class ClusterManager(
}
}

fun findRoute(sourceNode: NodeId, targetNode: NodeId): List<NodeId> {
val graph = nodeGraph.get() ?: buildGraph()
val path = DijkstraShortestPath.findPathBetween(graph, sourceNode, targetNode)
return path?.vertexList?.drop(1) ?: emptyList()
}

private fun buildGraph(): Graph<NodeId, DefaultEdge> {
val graph = DefaultDirectedGraph<NodeId, DefaultEdge>(DefaultEdge::class.java)
@@ -131,10 +136,4 @@ class ClusterManager(
this.nodeGraph.set(graph)
return graph
}

fun findRoute(sourceNode: NodeId, targetNode: NodeId): List<NodeId> {
val graph = nodeGraph.get() ?: buildGraph()
val path = DijkstraShortestPath.findPathBetween(graph, sourceNode, targetNode)
return path?.vertexList?.drop(1) ?: emptyList()
}
}

0 comments on commit 2eb99f9

Please sign in to comment.
You can’t perform that action at this time.