Update Kotlin version, refine .gitignore, and optimize tests

Upgraded Kotlin Multiplatform plugin to version 2.1.20 for better compatibility and feature enhancements. Adjusted .gitignore to include `.idea/**` for broader IntelliJ configuration exclusion. Increased test iteration count in `TestCachedString` to improve benchmarking precision.
This commit is contained in:
2025-04-09 20:45:39 +02:00
parent 4a4de2c22c
commit d671fbd64b
4 changed files with 5 additions and 5 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@ build/
!**/src/test/**/build/
### IntelliJ IDEA ###
.idea/**
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml

View File

@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "2.1.0"
kotlin("multiplatform") version "2.1.20"
`maven-publish`
signing
id("org.jetbrains.dokka") version "1.5.31"

View File

@@ -46,4 +46,3 @@ When such a type is updated, for example we update a string with a shorter strin
Strings are stored as UTF-8 bytes, there is also a CachedStringProperty which will keep a copy of the string so it isn't converted to a
native string every time it's accessed.

View File

@@ -25,7 +25,7 @@ class TestCachedString {
notCachedPerson.name = "A Longer Longer Longer Longer Longer Test"
var total = 0
repeat(1000000) {
repeat(10000000) {
total += cachedPerson.name.hashCode()
total += notCachedPerson.name.hashCode()
}
@@ -34,14 +34,14 @@ class TestCachedString {
var start1 = System.nanoTime()
var total1 = 0
repeat(1000000) {
repeat(10000000) {
total1 += cachedPerson.name.hashCode()
}
val stop1 = System.nanoTime()
var start2 = System.nanoTime()
var total2 = 0
repeat(1000000) {
repeat(10000000) {
total2 += notCachedPerson.name.hashCode()
}
val stop2 = System.nanoTime()