Initial commit

This commit is contained in:
2020-08-31 00:06:26 +01:00
commit b0d2f9159c
115 changed files with 2826 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
package com.appttude.h_mal.shared
import kotlinx.coroutines.*
internal actual val ApplicationDispatcher: CoroutineDispatcher = Dispatchers.Default

View File

@@ -0,0 +1,5 @@
package com.appttude.h_mal.shared
actual fun platformName() : String {
return "Android"
}

View File

@@ -0,0 +1,5 @@
package com.appttude.h_mal.shared
import kotlinx.coroutines.*
internal expect val ApplicationDispatcher: CoroutineDispatcher

View File

@@ -0,0 +1,7 @@
package com.appttude.h_mal.shared
expect fun platformName() : String
fun createApplicationScreenMessage() : String {
return "Kotlin Rocks on ${platformName()}"
}

View File

@@ -0,0 +1,16 @@
package com.appttude.h_mal.shared
import kotlinx.coroutines.*
import platform.darwin.*
internal actual val ApplicationDispatcher: CoroutineDispatcher = NsQueueDispatcher(dispatch_get_main_queue())
internal class NsQueueDispatcher(
private val dispatchQueue: dispatch_queue_t
) : CoroutineDispatcher() {
override fun dispatch(context: CoroutineContext, block: Runnable) {
dispatch_async(dispatchQueue) {
block.run()
}
}
}

View File

@@ -0,0 +1,8 @@
package com.appttude.h_mal.shared
import platform.UIKit.UIDevice
actual fun platformName() : String {
return "iOS " + UIDevice.currentDevice.systemVersion
}

View File

@@ -0,0 +1,2 @@
// This file is needed because the packForXcode task requires the source code to be present to generate the XCode framework.
// Feel free to remove this file as soon as you have created some code in this source set.

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="me.h_mal.android"/>