Skip to content

Commit 96413b1

Browse files
committed
chore: bump kotlin version to 1.5.10
1 parent c2dd89c commit 96413b1

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import org.jetbrains.dokka.gradle.DokkaTask
33
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
44
import java.net.URI
55

6-
val kotlinVersion = "1.4.21"
6+
val kotlinVersion = "1.5.10"
77

88
group = "dev.reactant"
99

1010
plugins {
1111
java
1212
`maven-publish`
1313
signing
14-
kotlin("jvm") version "1.3.72"
14+
kotlin("jvm") version "1.5.10"
1515
id("com.github.johnrengelman.shadow") version "5.0.0"
1616
id("org.jetbrains.dokka") version "0.10.0"
1717
id("com.palantir.git-version") version "0.12.3"

src/main/kotlin/dev/reactant/reactant/core/dependency/ProviderRelationManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ProviderRelationManager {
4747
if (fromDependency != null) walked[fromDependency.first] = fromDependency.second
4848
if (walked.contains(dependency)) throw CyclicDependencyRelationException(dependency, walked)
4949
return (depth[dependency] // if cache exist
50-
?: nodes[dependency]!!.required.map { getDependencyDepth(it.key.dependency, dependency to it.value, LinkedHashMap(walked)) + 1 }.max() // from max depth + 1
50+
?: nodes[dependency]!!.required.map { getDependencyDepth(it.key.dependency, dependency to it.value, LinkedHashMap(walked)) + 1 }.maxOrNull() // from max depth + 1
5151
?: 0) // 0 if no required providers
5252
}
5353
nodes.keys.forEach {

src/main/kotlin/dev/reactant/reactant/extra/command/PermissionNode.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package dev.reactant.reactant.extra.command
22

3+
import java.util.*
4+
35
interface PermissionNode
46

57
open class PermissionRoot(protected val prefix: String) : PermissionNode {
68

79
open class S(_prefix: String) : PermissionNode {
8-
protected val prefix = "${_prefix}.${this::class.simpleName?.toLowerCase()!!}"
10+
protected val prefix = "${_prefix}.${this::class.simpleName?.lowercase(Locale.getDefault())!!}"
911
override fun toString() = prefix
1012
}
1113

src/main/kotlin/dev/reactant/reactant/ui/element/style/ReactantComputedStyle.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ReactantComputedStyle(val el: ReactantUIElement) {
181181
val autoMarginSpace get() = (max(0, widthPerRow - width) / totalAutoMargin)
182182

183183
val rowHeight
184-
get() = children.map { it.computedStyle!!.offsetHeight + it.computedStyle!!.marginTop + it.computedStyle!!.marginBottom }.max()
184+
get() = children.map { it.computedStyle!!.offsetHeight + it.computedStyle!!.marginTop + it.computedStyle!!.marginBottom }.maxOrNull()
185185
?: 0
186186

187187
fun canInsert(el: ReactantUIElement): Boolean = width == 0 || width + el.offsetWidth <= widthPerRow
@@ -209,7 +209,7 @@ class ReactantComputedStyle(val el: ReactantUIElement) {
209209
}
210210

211211
if (revisedWidth is PositioningFitContent) {
212-
offsetWidth = (childrenRows.map { it.width }.max() ?: 0) + paddingLeft + paddingRight
212+
offsetWidth = (childrenRows.map { it.width }.maxOrNull() ?: 0) + paddingLeft + paddingRight
213213
}
214214
}
215215

@@ -225,7 +225,7 @@ class ReactantComputedStyle(val el: ReactantUIElement) {
225225
} else {
226226
row.children.filter { it.height !is PositioningAutoValue }.forEach { it.computedStyle!!.computeOffsetHeightOnly(0) }
227227
row.children.forEach { it.computedStyle!!.let { if (it.revisedHeight is PositioningFitContent) it.computeChildrenPosition() } }
228-
val suggestingAutoHeight = row.children.map { it.offsetHeight }.max()
228+
val suggestingAutoHeight = row.children.map { it.offsetHeight }.maxOrNull()
229229
row.children.filter { it.height is PositioningAutoValue }.forEach { it.computedStyle!!.computeOffsetHeightOnly(suggestedAutoHeight) }
230230
row.children.forEach { it.computedStyle!!.computeChildrenPosition() }
231231
}

0 commit comments

Comments
 (0)