From 5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 19 Jan 2023 04:10:57 +0100 Subject: Revise README documentation for examples and plugins (#2736) --- .../commonMain/kotlin/org.kotlintestmpp.common/main.kt | 4 ---- .../kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt | 15 +++++++++++++++ .../kotlin/org/kotlintestmpp/CommonDateUtils.kt | 14 ++++++++++++++ .../src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt | 7 +++++++ .../src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt | 6 ------ .../commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt | 8 -------- 6 files changed, 36 insertions(+), 18 deletions(-) delete mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org.kotlintestmpp.common/main.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonCoroutineExtensions.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt delete mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/coroutines.kt delete mode 100644 examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt (limited to 'examples/gradle/dokka-multiplatform-example/src/commonMain') 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/main.kt deleted file mode 100644 index 1746d513..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org.kotlintestmpp.common/main.kt +++ /dev/null @@ -1,4 +0,0 @@ -package org.kotlintestmpp.common - -class Foo {} - 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 CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred + +/** + * Common coroutine extension + */ +fun CoroutineDispatcher.name(): String = TODO("Not implemented") diff --git a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt new file mode 100644 index 00000000..b241f5ea --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/CommonDateUtils.kt @@ -0,0 +1,14 @@ +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/Foo.kt b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt new file mode 100644 index 00000000..96c825c5 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/common/Foo.kt @@ -0,0 +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 CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred 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/getCurrentDate.kt deleted file mode 100644 index 46a1dd23..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/commonMain/kotlin/org/kotlintestmpp/getCurrentDate.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.kotlintestmpp - -expect fun getCurrentDate(): String - -fun getDate(): String { - return "Today's Date is ${getCurrentDate()}" -} - -- cgit