diff options
Diffstat (limited to 'runners/gradle-integration-tests/testData')
13 files changed, 166 insertions, 68 deletions
diff --git a/runners/gradle-integration-tests/testData/androidApp/app/build.gradle b/runners/gradle-integration-tests/testData/androidApp/app/build.gradle index 1555de9f..2420107c 100644 --- a/runners/gradle-integration-tests/testData/androidApp/app/build.gradle +++ b/runners/gradle-integration-tests/testData/androidApp/app/build.gradle @@ -9,14 +9,13 @@ buildscript { } plugins { - id 'org.jetbrains.dokka-android' + id 'org.jetbrains.dokka' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -apply plugin: 'org.jetbrains.dokka-android' android { compileSdkVersion Integer.parseInt(sdk_version) @@ -42,9 +41,5 @@ android { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$test_kotlin_version" -} - - -dokka { - dokkaFatJar = new File(dokka_fatjar) + dokkaRuntime files(dokka_fatjar) }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/androidAppJavadoc/app/build.gradle b/runners/gradle-integration-tests/testData/androidAppJavadoc/app/build.gradle index 6a053a5e..66421f52 100644 --- a/runners/gradle-integration-tests/testData/androidAppJavadoc/app/build.gradle +++ b/runners/gradle-integration-tests/testData/androidAppJavadoc/app/build.gradle @@ -9,13 +9,12 @@ buildscript { } plugins { - id 'org.jetbrains.dokka-android' + id 'org.jetbrains.dokka' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.dokka-android' android { compileSdkVersion Integer.parseInt(sdk_version) @@ -41,10 +40,10 @@ android { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$test_kotlin_version" + dokkaRuntime files(dokka_fatjar) } dokka { outputFormat = "javadoc" - dokkaFatJar = new File(dokka_fatjar) }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/androidLibDependsOnJavaLib/lib/build.gradle b/runners/gradle-integration-tests/testData/androidLibDependsOnJavaLib/lib/build.gradle index 0f27d365..b1ee52ab 100644 --- a/runners/gradle-integration-tests/testData/androidLibDependsOnJavaLib/lib/build.gradle +++ b/runners/gradle-integration-tests/testData/androidLibDependsOnJavaLib/lib/build.gradle @@ -7,13 +7,12 @@ buildscript { plugins { - id 'org.jetbrains.dokka-android' + id 'org.jetbrains.dokka' } apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.dokka-android' android { @@ -27,13 +26,14 @@ android { dependencies { api(project(":jlib")) + dokkaRuntime files(dokka_fatjar) } dokka { - dokkaFatJar = new File(dokka_fatjar) - - externalDocumentationLink { - url = new URL("https://example.com") - packageListUrl = file("$rootDir/package-list").toURI().toURL() + configuration { + externalDocumentationLink { + url = new URL("https://example.com") + packageListUrl = file("$rootDir/package-list").toURI().toURL() + } } }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/app/build.gradle b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/app/build.gradle index ee68ba6d..660257ab 100644 --- a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/app/build.gradle +++ b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/app/build.gradle @@ -9,14 +9,13 @@ buildscript { } plugins { - id 'org.jetbrains.dokka-android' + id 'org.jetbrains.dokka' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -apply plugin: 'org.jetbrains.dokka-android' android { compileSdkVersion Integer.parseInt(sdk_version) @@ -57,19 +56,20 @@ android { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$test_kotlin_version" + dokkaRuntime files(dokka_fatjar) } dokka { outputDirectory = "$buildDir/dokka/all" - dokkaFatJar = new File(dokka_fatjar) } -task dokkaFullFlavourOnly(type: org.jetbrains.dokka.gradle.DokkaAndroidTask) { - kotlinTasks { - ["compileFullReleaseKotlin"] - } - dokkaFatJar = new File(dokka_fatjar) +task dokkaFullFlavourOnly(type: org.jetbrains.dokka.gradle.DokkaTask) { outputDirectory = "$buildDir/dokka/fullOnly" - moduleName = "full" + configuration { + moduleName = "full" + kotlinTasks { + ["compileFullReleaseKotlin"] + } + } }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/basic/build.gradle b/runners/gradle-integration-tests/testData/basic/build.gradle index a3116751..79645204 100644 --- a/runners/gradle-integration-tests/testData/basic/build.gradle +++ b/runners/gradle-integration-tests/testData/basic/build.gradle @@ -29,12 +29,14 @@ repositories { } dependencies { + dokkaRuntime files(dokka_fatjar) compile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: test_kotlin_version compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: test_kotlin_version } dokka { - dokkaFatJar = new File(dokka_fatjar) - classpath += files("$projectDir/classDir") + configuration { + classpath += "$projectDir/classDir" + } }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle index 4f561472..0ea86d4c 100644 --- a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle +++ b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle @@ -22,11 +22,16 @@ subprojects { } } +dependencies { + dokkaRuntime files(dokka_fatjar) +} + apply plugin: 'org.jetbrains.dokka' dokka { - kotlinTasks { - [":subA:compileKotlin", ":subB:compileKotlin"] + configuration { + kotlinTasks { + [":subA:compileKotlin", ":subB:compileKotlin"] + } } - dokkaFatJar = new File(dokka_fatjar) }
\ No newline at end of file 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..b5454c55 --- /dev/null +++ b/runners/gradle-integration-tests/testData/multiplatformProject/build.gradle @@ -0,0 +1,60 @@ +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') + } + } + } +} + +dependencies { + dokkaRuntime files(dokka_fatjar) +} + +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") + + diff --git a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle index 4627e8ef..a6270e23 100644 --- a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle +++ b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle @@ -29,11 +29,7 @@ repositories { } dependencies { + dokkaRuntime files(dokka_fatjar) compile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: test_kotlin_version compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: test_kotlin_version -} - - -dokka { - dokkaFatJar = new File(dokka_fatjar) }
\ No newline at end of file diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle index 327cead8..8688ae41 100644 --- a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle +++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle @@ -8,6 +8,7 @@ import java.util.concurrent.Callable buildscript { repositories { jcenter() + mavenLocal() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$test_kotlin_version" @@ -23,57 +24,45 @@ apply plugin: 'kotlin' @CompileStatic def configureDokkaTypeSafely(DokkaTask dokka) { dokka.with { - moduleName = "some String" outputFormat = "some String" outputDirectory = "some String" - classpath = Collections.singleton(file("someClassDir")) - includes = Collections.emptyList() - linkMappings = new ArrayList<LinkMapping>() - samples = Collections.emptyList() + cacheRoot = null as String + impliedPlatforms = new ArrayList<String>() + } + dokka.configuration.with { + moduleName = "some String" + classpath = Arrays.asList("someClassDir") + includes = Collections.<String> emptyList() + samples = Collections.<String> emptyList() jdkVersion = 6 - sourceDirs = Collections.<File>emptyList() - sourceRoots = new ArrayList<SourceRoot>() - dokkaFatJar = file("some File") + sourceRoots = new ArrayList<GradleSourceRootImpl>() as List<DokkaConfiguration.SourceRoot> + includeNonPublic = false skipDeprecated = false skipEmptyPackages = true reportUndocumented = true - perPackageOptions = new ArrayList<PackageOptions>() - impliedPlatforms = Collections.<String>emptyList() + perPackageOptions = new ArrayList<GradlePackageOptionsImpl>() as List<DokkaConfiguration.PackageOptions> externalDocumentationLinks = new ArrayList<DokkaConfiguration.ExternalDocumentationLink>() noStdlibLink = false - cacheRoot = null as String languageVersion = null as String apiVersion = null as String - kotlinTasks(new Callable<List<Object>>() { - @Override - List<Object> call() { - return defaultKotlinTasks() - } - }) - linkMapping(new Action<LinkMapping>() { + sourceRoot(new Action<GradleSourceRootImpl>() { @Override - void execute(LinkMapping mapping) { - mapping.dir = "some String" - mapping.url = "some String" - } - }) - sourceRoot(new Action<SourceRoot>() { - @Override - void execute(SourceRoot sourceRoot) { + void execute(GradleSourceRootImpl sourceRoot) { sourceRoot.path = "some String" } }) - packageOptions(new Action<PackageOptions>() { + externalDocumentationLink(new Action<GradleExternalDocumentationLinkImpl>() { @Override - void execute(PackageOptions packageOptions) { - packageOptions.prefix = "some String" + void execute(GradleExternalDocumentationLinkImpl link) { + link.url = uri("some URI").toURL() + link.packageListUrl = uri("some URI").toURL() } }) - externalDocumentationLink(new Action<DokkaConfiguration.ExternalDocumentationLink.Builder>() { + kotlinTasks(new Callable<List<Object>>() { @Override - void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) { - builder.url = uri("some URI").toURL() + List<Object> call() { + return defaultKotlinTasks() } }) } |