Alexander Larsson
06/16/2020, 8:27 AMaleksey.tomin
06/16/2020, 8:32 AMorg.jetbrains.kotlin.konan.target.HostManager.hostIsLinux
etc properties in build.gradle.kts
.Alexander Larsson
06/16/2020, 8:37 AMconnectedAndroidTest
task from Gradle. I guess it runs on the emulator because it fails if you haven't started an emulator manually first. What do you mean with properties in build.gradle.kts
. Can I define properties in the Gradle file that is available at runtime?aleksey.tomin
06/16/2020, 8:39 AMHostManager.host_os()
in the build file?Alexander Larsson
06/16/2020, 8:45 AMosx
no matter which platform I build for. (JVM, Android, iOS)internal actual fun testSqlDriver(): SqlDriver {
try {
val context = InstrumentationRegistry.getInstrumentation().context
return AndroidSqliteDriver(Database.Schema, context, "androidtestdb")
}
catch (e: IllegalStateException) {
return JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY).apply {
Database.Schema.create(this)
}
}
}
How did I not think of this before? 😅 Thanks for the help though! Did not know of host manager before. 🙂