aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-integration-tests/testData/multiplatformProject
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-09-09 16:30:41 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-09-09 16:31:55 +0200
commitdb33337316392f3aacf16943369fbbe1af2f117d (patch)
treeb9d23a9379c563f98d4bce868f715b494b349178 /runners/gradle-integration-tests/testData/multiplatformProject
parent00c8b625b547dd01e8038a3b70a62514983c6974 (diff)
downloaddokka-db33337316392f3aacf16943369fbbe1af2f117d.tar.gz
dokka-db33337316392f3aacf16943369fbbe1af2f117d.tar.bz2
dokka-db33337316392f3aacf16943369fbbe1af2f117d.zip
Add a test for multiplatform and kotlinTasks
Diffstat (limited to 'runners/gradle-integration-tests/testData/multiplatformProject')
-rw-r--r--runners/gradle-integration-tests/testData/multiplatformProject/build.gradle56
-rw-r--r--runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt17
-rw-r--r--runners/gradle-integration-tests/testData/multiplatformProject/settings.gradle1
-rw-r--r--runners/gradle-integration-tests/testData/multiplatformProject/src/jsMain/kotlin/org/kotlintestmpp/main.kt14
-rw-r--r--runners/gradle-integration-tests/testData/multiplatformProject/src/jvmMain/kotlin/org/kotlintestmpp/main.kt20
5 files changed, 108 insertions, 0 deletions
diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/build.gradle b/runners/gradle-integration-tests/testData/multiplatformProject/build.gradle
new file mode 100644
index 00000000..be7ae999
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/multiplatformProject/build.gradle
@@ -0,0 +1,56 @@
+buildscript {
+ repositories {
+ mavenCentral()
+ jcenter()
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$test_kotlin_version"
+ }
+}
+
+plugins {
+ id 'org.jetbrains.dokka'
+}
+
+repositories {
+ jcenter()
+ mavenLocal()
+}
+
+group 'org.test'
+version '1.0-SNAPSHOT'
+
+apply plugin: "org.jetbrains.kotlin.multiplatform"
+
+kotlin {
+ jvm() // Create a JVM target with the default name 'jvm'
+ js()
+ sourceSets {
+ jsMain {
+ dependencies{
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
+ }
+ }
+ jvmMain {
+ dependencies {
+ implementation kotlin('stdlib-jdk8')
+ }
+ }
+ }
+}
+
+apply plugin: 'org.jetbrains.dokka'
+
+dokka {
+
+ multiplatform {
+ javascript {
+ targets = ["js"]
+ platform = "js"
+ kotlinTasks { [tasks.getByPath(":compileKotlinJs")] }
+ }
+ jvm {}
+ }
+}
diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt b/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt
new file mode 100644
index 00000000..51a5df94
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt
@@ -0,0 +1,17 @@
+/
+ multiplatform-project-root/
+ alltypes/
+ index.html
+ index-outline.html
+ index.html
+ org.kotlintestmpp/
+ get-current-date.html
+ index.html
+ js.html
+ jvm.html
+ kotlin.-string/
+ index.html
+ main.html
+ shared.html
+ package-list
+ style.css
diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/settings.gradle b/runners/gradle-integration-tests/testData/multiplatformProject/settings.gradle
new file mode 100644
index 00000000..0bb1e91b
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/multiplatformProject/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "multiplatformProjectRoot"
diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/src/jsMain/kotlin/org/kotlintestmpp/main.kt b/runners/gradle-integration-tests/testData/multiplatformProject/src/jsMain/kotlin/org/kotlintestmpp/main.kt
new file mode 100644
index 00000000..a77b50f9
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/multiplatformProject/src/jsMain/kotlin/org/kotlintestmpp/main.kt
@@ -0,0 +1,14 @@
+package org.kotlintestmpp
+
+fun main(args : Array<String>) {
+ console.log("Hello, world!")
+}
+
+fun js(){}
+fun shared(){}
+
+fun getCurrentDate(): String {
+ return "test"
+}
+
+fun String.myExtension() = println("test") \ No newline at end of file
diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/src/jvmMain/kotlin/org/kotlintestmpp/main.kt b/runners/gradle-integration-tests/testData/multiplatformProject/src/jvmMain/kotlin/org/kotlintestmpp/main.kt
new file mode 100644
index 00000000..96d725fc
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/multiplatformProject/src/jvmMain/kotlin/org/kotlintestmpp/main.kt
@@ -0,0 +1,20 @@
+package org.kotlintestmpp
+
+
+fun main(args : Array<String>) {
+ println("Hello, world!")
+}
+
+/**
+ * comment for this class
+ */
+fun jvm(){}
+fun shared(){}
+
+fun getCurrentDate(): String {
+ return "test"
+}
+
+fun String.myExtension() = println("test2")
+
+