aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin')
-rw-r--r--examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt15
-rw-r--r--examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt (renamed from examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt)8
-rw-r--r--examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt (renamed from examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org.kotlintestmpp.common/main.kt)3
-rw-r--r--examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt6
4 files changed, 25 insertions, 7 deletions
diff --git a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt
new file mode 100644
index 00000000..30bea657
--- /dev/null
+++ b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt
@@ -0,0 +1,15 @@
+package org.kotlintestmpp.coroutines
+
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.Deferred
+
+/**
+ * Common `expect` declaration
+ */
+expect fun <T> CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred<T>
+
+/**
+ * Common coroutine extension
+ */
+fun CoroutineDispatcher.name(): String = TODO("Not implemented")
diff --git a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt
index 46a1dd23..b241f5ea 100644
--- a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt
+++ b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt
@@ -1,7 +1,13 @@
-package org.kotlintestmpp
+package org.kotlintestmpp.date
+/**
+ * Common `expect` declaration
+ */
expect fun getCurrentDate(): String
+/**
+ * Common date util function
+ */
fun getDate(): String {
return "Today's Date is ${getCurrentDate()}"
}
diff --git a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org.kotlintestmpp.common/main.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt
index 1746d513..96c825c5 100644
--- a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org.kotlintestmpp.common/main.kt
+++ b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt
@@ -1,4 +1,7 @@
package org.kotlintestmpp.common
+/**
+ * Common Foo class
+ */
class Foo {}
diff --git a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt
deleted file mode 100644
index 330cd83a..00000000
--- a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.kotlintestmpp
-
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Deferred
-
-expect fun <T> CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred<T>