Skip to content

Commit

Permalink
Fix the native unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoyuang committed Dec 4, 2024
1 parent 01abf5f commit b61d6c8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ kotlin.code.style=official
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.natvie.increment=true
ksp.useKSP2=true
#ksp.useKSP2=true
#kotlin.compiler.execution.strategy=out-of-process
6 changes: 3 additions & 3 deletions sqllin-dsl/doc/getting-start-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
id("com.google.devtools.ksp")
}

val sqllinVersion = "1.3.1"
val sqllinVersion = "1.4.0"

kotlin {
// ......
Expand All @@ -28,10 +28,10 @@ kotlin {
implementation("com.ctrip.kotlin:sqllin-driver:$sqllinVersion")

// The sqllin-dsl serialization and deserialization depends on kotlinx-serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3")

// Since 1.2.2, sqllin-dsl depends on kotlinx.coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
}
}
// ......
Expand Down
6 changes: 3 additions & 3 deletions sqllin-dsl/doc/getting-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
id("com.google.devtools.ksp")
}

val sqllinVersion = "1.3.1"
val sqllinVersion = "1.4.0"

kotlin {
// ......
Expand All @@ -30,10 +30,10 @@ kotlin {
implementation("com.ctrip.kotlin:sqllin-driver:$sqllinVersion")

// The sqllin-dsl serialization and deserialization depends on kotlinx-serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3")

// Since 1.2.2, sqllin-dsl depends on kotlinx.coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
}
}
// ......
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import platform.Foundation.NSUserDomainMask
*/

@OptIn(UnsafeNumber::class)
actual fun getPlatformStringPath(): String =
internal actual fun getPlatformStringPath(): String =
(NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true).firstOrNull() as? String ?: "")

actual val pathSeparator: Char = '/'
// actual val pathSeparator: Char = '/'
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import platform.posix.getcwd
*/

@OptIn(ExperimentalForeignApi::class)
actual fun getPlatformStringPath(): String =
internal actual fun getPlatformStringPath(): String =
getcwd(null, 0u)?.toKString() ?: throw IllegalStateException("The temp path created error")

actual val pathSeparator: Char = '/'
// actual val pathSeparator: Char = '/'
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import platform.posix._wgetcwd
*/

@OptIn(ExperimentalForeignApi::class)
actual fun getPlatformStringPath(): String =
internal actual fun getPlatformStringPath(): String =
_wgetcwd(null, 0)?.toKString() ?: throw IllegalStateException("Get database path wrong")

actual val pathSeparator: Char = '\\'
// actual val pathSeparator: Char = '\\'
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ package com.ctrip.sqllin.dsl
/**
* Get the DatabasePath
*/
expect fun getPlatformStringPath(): String
internal expect fun getPlatformStringPath(): String

/**
* Get the file path separator, '\' in Windows, '/' in others
*/
expect val pathSeparator: Char
// expect val pathSeparator: Char

0 comments on commit b61d6c8

Please sign in to comment.