Compare commits

..

4 Commits

Author SHA1 Message Date
yura ca6b4df548 Adding MatrixStorageTest 2026-05-13 09:38:06 +02:00
yura 512ba38209 Adding some extensions 2026-05-12 12:37:53 +02:00
yura 49b6dffdba Adding companion create method 2026-05-12 08:55:24 +02:00
yura 9f20223e92 Basic Matrix and Matrix Storage implementation 2026-05-11 22:57:06 +02:00
7 changed files with 19 additions and 32 deletions
View File
-3
View File
@@ -1,3 +0,0 @@
# Matrix
TODO
+5 -5
View File
@@ -2,9 +2,9 @@
# Main # Main
gradle = "9.5.1" # https://gradle.org/releases/ gradle = "9.5.0" # https://gradle.org/releases/
kotlin = "2.4.0" # https://kotlinlang.org/docs/releases.html#release-details kotlin = "2.3.21" # https://kotlinlang.org/docs/releases.html#release-details
ktlint-library = "1.8.0" # https://github.com/pinterest/ktlint ktlint-library = "1.8.0" # https://github.com/pinterest/ktlint
ktlint-plugin = "14.2.0" # https://github.com/JLLeitschuh/ktlint-gradle ktlint-plugin = "14.2.0" # https://github.com/JLLeitschuh/ktlint-gradle
@@ -13,9 +13,9 @@ memoize = "0.1" # https://gitea.davygora.duckdns.org/yura/-/packages/maven/org.d
# Test # Test
kotest = "6.2.0" # https://mvnrepository.com/artifact/io.kotest/kotest-runner-junit5 kotest = "6.1.11" # https://mvnrepository.com/artifact/io.kotest/kotest-runner-junit5
junit = "6.1.0" # https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter junit = "6.0.3" # https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
mockk = "1.14.11" # https://mvnrepository.com/artifact/io.mockk/mockk mockk = "1.14.9" # https://mvnrepository.com/artifact/io.mockk/mockk
[libraries] [libraries]
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
networkTimeout=10000 networkTimeout=10000
retries=0 retries=0
retryBackOffMs=500 retryBackOffMs=500
Vendored
+1 -1
View File
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/<unknown>/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
-10
View File
@@ -1,10 +0,0 @@
{
"extends": ["config:recommended"],
"labels": ["dependencies"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
]
}
@@ -4,18 +4,18 @@ package org.duckdns.davygora.matrix.util
inline fun <reified T> Any.toListChecked(): List<T> = inline fun <reified T> Any.toListChecked(): List<T> =
when (this) { when (this) {
is List<*> -> this is List<*> -> this
is Collection<*> -> toList() is Collection<*> -> this.toList()
is Iterable<*> -> toList() is Iterable<*> -> this.toList()
is Sequence<*> -> toList() is Sequence<*> -> this.toList()
is Array<*> -> asList() is Array<*> -> this.asList()
is BooleanArray -> asList() is BooleanArray -> this.asList()
is ByteArray -> asList() is ByteArray -> this.asList()
is CharArray -> asList() is CharArray -> this.asList()
is DoubleArray -> asList() is DoubleArray -> this.asList()
is FloatArray -> asList() is FloatArray -> this.asList()
is IntArray -> asList() is IntArray -> this.asList()
is LongArray -> asList() is LongArray -> this.asList()
is ShortArray -> asList() is ShortArray -> this.asList()
else -> error("Unsupported type: ${this::class}") else -> error("Unsupported type: ${this::class}")
}.also { list -> }.also { list ->
require(list.all { it is T }) require(list.all { it is T })