Skip to content

Commit

Permalink
update versions of kotlin and gradle in attempt to use the buggy Comp…
Browse files Browse the repository at this point in the history
…ose Resources which is not working and no better than loading from class resources, but I upgrade anyway as they will be deprecated one day
  • Loading branch information
sunny-chung committed Nov 15, 2024
1 parent a26db15 commit 8ed3c9a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ kotlin {
implementation(compose.desktop.currentOs)
implementation(kotlin("reflect"))
implementation(kotlin("stdlib"))
implementation(compose.components.resources)

implementation("co.touchlab:kermit:1.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.6.0")
Expand Down Expand Up @@ -171,6 +172,10 @@ tasks.withType<Test> {
}
}

compose.resources {
generateResClass = always
}

compose.desktop {
application {
val distributionVersion = "^(\\d+\\.\\d+\\.\\d+).*".toRegex().matchEntire(project.version.toString())!!.groupValues[1]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
kotlin.version=1.8.0
kotlin.version=1.9.24
agp.version=7.3.0
compose.version=1.6.11
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.6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fun <T: DropDownable> DropDownView(
maxLines: Int = 1,
isLabelFillMaxWidth: Boolean = false,
isShowLabel: Boolean = true,
testTagParts: Array<Any?>? = null,
contentView: @Composable (RowScope.(it: T?, isLabel: Boolean, isSelected: Boolean, isClickable: Boolean) -> Unit) = {it, isLabel, isSelected, isClickable ->
AppText(
text = it?.displayText.emptyToNull() ?: "--",
Expand All @@ -68,7 +69,6 @@ fun <T: DropDownable> DropDownView(
)
},
arrowPadding: PaddingValues = PaddingValues(0.dp),
testTagParts: Array<Any?>? = null,
selectedItem: T? = null,
onClickItem: (T) -> Boolean,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BigTextTransformerImpl(override val originalText: BigText) : BigTextImpl(
override fun computeWhenLeftRotate(x: BigTextTransformNodeValue, y: BigTextTransformNodeValue) {}
override fun computeWhenRightRotate(x: BigTextTransformNodeValue, y: BigTextTransformNodeValue) {}
}
)
) as LengthTree<BigTextNodeValue>

private fun BigTextNodeValue.toBigTextTransformNodeValue() : BigTextTransformNodeValue {
return BigTextTransformNodeValue().also {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sunnychung.application.multiplatform.hellohttp.ux.bigtext

import com.williamfiset.algorithms.datastructures.balancedtree.RedBlackTree

open class LengthTree<out V>(computations: RedBlackTreeComputations<V>) : RedBlackTree2<@UnsafeVariance V>(computations)
open class LengthTree<V>(computations: RedBlackTreeComputations<V>) : RedBlackTree2<@UnsafeVariance V>(computations)
where V : LengthNodeValue, V : Comparable<@UnsafeVariance V>, V : DebuggableNode<in @UnsafeVariance V> {

fun findNodeByCharIndex(index: Int, isIncludeMarkerNodes: Boolean = true, isExact: Boolean = false): RedBlackTree<V>.Node? {
Expand Down

0 comments on commit 8ed3c9a

Please sign in to comment.