更新
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.taskttl.core.utils
|
||||
|
||||
actual object LogUtils {
|
||||
actual fun d(tag: String, message: String) {
|
||||
println("DEBUG [$tag]: $message")
|
||||
}
|
||||
|
||||
actual fun i(tag: String, message: String) {
|
||||
println("INFO [$tag]: $message")
|
||||
}
|
||||
|
||||
actual fun w(tag: String, message: String) {
|
||||
println("WARN [$tag]: $message")
|
||||
}
|
||||
|
||||
actual fun e(tag: String, message: String, throwable: Throwable?) {
|
||||
println("ERROR [$tag]: $message ${throwable?.message ?: ""}")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.taskttl.data.di
|
||||
|
||||
import com.taskttl.data.local.database.TaskTTLDatabase
|
||||
import com.taskttl.data.local.database.getDatabaseBuilder
|
||||
import org.koin.dsl.module
|
||||
|
||||
actual fun platformModule() = module {
|
||||
single<TaskTTLDatabase> { getDatabaseBuilder() }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.taskttl.data.local.database
|
||||
|
||||
import androidx.room.Room
|
||||
import java.io.File
|
||||
|
||||
actual fun getDatabaseBuilder(): TaskTTLDatabase {
|
||||
val dbFile = File(System.getProperty("java.io.tmpdir"), "taskttl_dababase.db")
|
||||
return Room.databaseBuilder<TaskTTLDatabase>(
|
||||
name = dbFile.absolutePath,
|
||||
).build()
|
||||
}
|
||||
13
composeApp/src/jvmMain/kotlin/com/taskttl/main.kt
Normal file
13
composeApp/src/jvmMain/kotlin/com/taskttl/main.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.taskttl
|
||||
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
|
||||
fun main() = application {
|
||||
Window(
|
||||
onCloseRequest = ::exitApplication,
|
||||
title = "TaskTTL",
|
||||
) {
|
||||
App()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user