Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ dependencies {

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DependencyGraph private constructor() {
.forEach { rootCandidates.remove(it) }

return rootCandidates.associateBy { heightOf(it.key) }
.maxBy { it.key }!!.value
.maxByOrNull { it.key }!!.value
}

fun nodes(): Collection<Node> = nodes.values
Expand Down Expand Up @@ -94,7 +94,7 @@ class DependencyGraph private constructor() {
if (isLeaf()) {
return 0
} else {
return 1 + dependsOn.map { it.height() }.max()!!
return 1 + dependsOn.map { it.height() }.maxOrNull()!!
}
}

Expand All @@ -104,7 +104,7 @@ class DependencyGraph private constructor() {
} else {
val path = mutableListOf<Node>(this)

val maxHeightNode = dependsOn.maxBy { it.height() }!!
val maxHeightNode = dependsOn.maxByOrNull { it.height() }!!
path.addAll(maxHeightNode.longestPath())

return path
Expand Down