diff options
author | vmishenev <vad-mishenev@yandex.ru> | 2021-07-28 14:57:38 +0300 |
---|---|---|
committer | vmishenev <vad-mishenev@yandex.ru> | 2021-07-28 19:11:50 +0300 |
commit | f03083d7534209ad94dc3c4d7afd17f58e58127d (patch) | |
tree | 8160e6e8d376fc16ad559cfa59048c5447d2e2bd /examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin | |
parent | 2cd95b0828518dde751d039f4456dcf93e04dfc1 (diff) | |
download | dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.gz dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.bz2 dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.zip |
Migrate Dokka examples to Dokka repo (KT-47798) (#2030)
* Migrate Dokka examples to Dokka repo (KT-47798)
* Configure workflow of examples checking
* Add workflow to deploy examples
Diffstat (limited to 'examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin')
4 files changed, 65 insertions, 0 deletions
diff --git a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/MainCommand.java b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/MainCommand.java new file mode 100644 index 00000000..16de8ef3 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/MainCommand.java @@ -0,0 +1,16 @@ +package org.kotlintestmpp; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface MainCommand { + String command(); + + String[] aliases(); + + String description(); +}
\ No newline at end of file diff --git a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt new file mode 100644 index 00000000..7b5fe652 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt @@ -0,0 +1,8 @@ +package org.kotlintestmpp + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred + +actual fun <T> CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred<T> { + TODO("Not yet implemented") +} diff --git a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/main.kt b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/main.kt new file mode 100644 index 00000000..bc5b53de --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/main.kt @@ -0,0 +1,30 @@ +package org.kotlintestmpp +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Job +import kotlinx.coroutines.launch +import org.kotlintestmpp.common.Foo + +fun main(args : Array<String>) { + println("Hello, world!") +} + +/** + * also see the [Foo] class + * @see org.kotlintestmpp.common.Foo + */ +fun jvm(){} +fun shared(){} +fun CoroutineScope.startConnectionPipeline( + input: String +): Job = launch { TODO () } + +/** + * Actual function for jvm + */ +actual fun getCurrentDate(): String { + return "test" +} + +fun String.myExtension() = println("test2") + + diff --git a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/shouldbesuppressed/supp.kt b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/shouldbesuppressed/supp.kt new file mode 100644 index 00000000..21dca566 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/shouldbesuppressed/supp.kt @@ -0,0 +1,11 @@ +package shouldbesuppressed + +/** + * This function should not be visible + */ +fun thatShouldNotBeVisible(): String = "oops" + +/** + * This class should not be visible + */ +class DontLookAtMe(val stealth: Int = 9001)
\ No newline at end of file |