diff options
Diffstat (limited to 'examples/gradle/dokka-multiplatform-example/src/jvmMain')
-rw-r--r-- | examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JavaAnnotation.java (renamed from examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/MainCommand.java) | 9 | ||||
-rw-r--r-- | examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmCoroutineExtensions.kt (renamed from examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt) | 5 | ||||
-rw-r--r-- | examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmDateUtils.kt | 8 | ||||
-rw-r--r-- | examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmFunctions.kt (renamed from examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/main.kt) | 29 | ||||
-rw-r--r-- | examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/shouldbesuppressed/supp.kt | 11 |
5 files changed, 35 insertions, 27 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/JavaAnnotation.java index 16de8ef3..8b11ca09 100644 --- a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/MainCommand.java +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JavaAnnotation.java @@ -5,12 +5,15 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * This is a Java annotation + */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -public @interface MainCommand { - String command(); +public @interface JavaAnnotation { + String usage(); 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/JvmCoroutineExtensions.kt index 7b5fe652..8f7fda49 100644 --- a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmCoroutineExtensions.kt @@ -1,8 +1,11 @@ -package org.kotlintestmpp +package org.kotlintestmpp.coroutines import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Deferred +/** + * JVM actual implementation for `asyncWithDelay` + */ 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/JvmDateUtils.kt b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmDateUtils.kt new file mode 100644 index 00000000..db7f2d74 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmDateUtils.kt @@ -0,0 +1,8 @@ +package org.kotlintestmpp.date + +/** + * JVM actual implementation for `getCurrentDate` + */ +actual fun getCurrentDate(): String { + return "test" +} 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/JvmFunctions.kt index bc5b53de..0ef8a99d 100644 --- a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/main.kt +++ b/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/org/kotlintestmpp/JvmFunctions.kt @@ -1,30 +1,35 @@ 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!") -} - /** + * Function declared in JVM source set + * * also see the [Foo] class * @see org.kotlintestmpp.common.Foo */ -fun jvm(){} -fun shared(){} +fun jvm() {} + +/** + * Function declared in JVM source set + * + * Function with the same name exists in another source set as well. + */ +fun shared() {} + +/** + * Extension declared in JVM source set + */ fun CoroutineScope.startConnectionPipeline( input: String -): Job = launch { TODO () } +): Job = launch { TODO() } /** - * Actual function for jvm + * Extension declared in JVM source set */ -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 deleted file mode 100644 index 21dca566..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/jvmMain/kotlin/shouldbesuppressed/supp.kt +++ /dev/null @@ -1,11 +0,0 @@ -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 |