From 996cf6655d53fd62922974011d5e6afb3271a6e9 Mon Sep 17 00:00:00 2001 From: Sean Proctor Date: Fri, 20 Dec 2024 09:03:11 -0500 Subject: [PATCH] fix android build --- .../warlockfe/warlock3/android/di/AndroidAppContainer.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/src/main/kotlin/warlockfe/warlock3/android/di/AndroidAppContainer.kt b/android/src/main/kotlin/warlockfe/warlock3/android/di/AndroidAppContainer.kt index eada6d3c..e6b112bb 100644 --- a/android/src/main/kotlin/warlockfe/warlock3/android/di/AndroidAppContainer.kt +++ b/android/src/main/kotlin/warlockfe/warlock3/android/di/AndroidAppContainer.kt @@ -2,7 +2,9 @@ package warlockfe.warlock3.android.di import android.content.Context import androidx.room.RoomDatabase +import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob import okio.Path.Companion.toOkioPath import warlockfe.warlock3.compose.AppContainer import warlockfe.warlock3.core.client.WarlockClient @@ -27,11 +29,15 @@ class AndroidAppContainer( ioDispatcher = Dispatchers.IO, warlockDirs = warlockDirs, ) { + + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO) + override val scriptManager = WarlockScriptEngineRegistry( highlightRepository = highlightRepository, variableRepository = variableRepository, scriptDirRepository = scriptDirRepository, + externalScope = scope, ) override val sgeClientFactory = object : SgeClientFactory {