diff options
Diffstat (limited to 'runners/gradle-integration-tests')
20 files changed, 238 insertions, 93 deletions
diff --git a/runners/gradle-integration-tests/build.gradle b/runners/gradle-integration-tests/build.gradle index 297a175a..2430d46b 100644 --- a/runners/gradle-integration-tests/build.gradle +++ b/runners/gradle-integration-tests/build.gradle @@ -1,5 +1,3 @@ - - apply plugin: 'kotlin' sourceCompatibility = 1.8 @@ -7,16 +5,16 @@ sourceCompatibility = 1.8 tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions { freeCompilerArgs += "-Xjsr305=strict" - languageVersion = "1.2" - apiVersion = "1.0" + languageVersion = language_version + apiVersion = language_version jvmTarget = "1.8" } } configurations { dokkaPlugin - dokkaAndroidPlugin dokkaFatJar + kotlinGradle } dependencies { @@ -26,9 +24,10 @@ dependencies { testCompile ideaRT() dokkaPlugin project(path: ':runners:gradle-plugin', configuration: 'shadow') - dokkaAndroidPlugin project(path: ':runners:android-gradle-plugin', configuration: 'shadow') dokkaFatJar project(path: ":runners:fatjar", configuration: 'shadow') + kotlinGradle "org.jetbrains.kotlin:kotlin-gradle-plugin" + testCompile group: 'junit', name: 'junit', version: '4.12' testCompile gradleTestKit() } @@ -38,14 +37,14 @@ dependencies { task createClasspathManifest { def outputDir = file("$buildDir/$name") - inputs.files(configurations.dokkaPlugin + configurations.dokkaAndroidPlugin + configurations.dokkaFatJar) + inputs.files(configurations.dokkaPlugin + configurations.dokkaFatJar) outputs.dir outputDir doLast { outputDir.mkdirs() file("$outputDir/dokka-plugin-classpath.txt").text = configurations.dokkaPlugin.join("\n") - file("$outputDir/android-dokka-plugin-classpath.txt").text = configurations.dokkaAndroidPlugin.join("\n") file("$outputDir/fatjar.txt").text = configurations.dokkaFatJar.join("\n") + file("$outputDir/kotlin-gradle.txt").text = configurations.kotlinGradle.join("\n") } } diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt index 06753342..334fc7c8 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt @@ -5,7 +5,7 @@ import java.io.File abstract class AbstractDokkaAndroidGradleTest : AbstractDokkaGradleTest() { - override val pluginClasspath: List<File> = androidPluginClasspathData.toFile().readLines().map { File(it) } + override val pluginClasspath: List<File> = pluginClasspathData.toFile().readLines().map { File(it) } companion object { @@ -31,7 +31,7 @@ abstract class AbstractDokkaAndroidGradleTest : AbstractDokkaGradleTest() { acceptedLicenses.listFiles().forEach { licenseFile -> val target = sdkLicensesDir.resolve(licenseFile.name) if(!target.exists() || target.readText() != licenseFile.readText()) { - val overwrite = System.getProperty("android.licenses.overwrite", "false").toBoolean() + val overwrite = System.getProperty("android.licenses.overwrite", "false")!!.toBoolean() if (!target.exists() || overwrite) { licenseFile.copyTo(target, true) println("Accepted ${licenseFile.name}, by copying $licenseFile to $target") diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt index 255138a9..4814e707 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt @@ -7,15 +7,15 @@ import org.junit.Rule import org.junit.rules.TemporaryFolder import java.io.File import java.nio.file.Files +import java.nio.file.Path import java.nio.file.Paths -val testDataFolder = Paths.get("testData") +val testDataFolder: Path = Paths.get("testData") -val pluginClasspathData = Paths.get("build", "createClasspathManifest", "dokka-plugin-classpath.txt") -val androidPluginClasspathData = pluginClasspathData.resolveSibling("android-dokka-plugin-classpath.txt") +val pluginClasspathData: Path = Paths.get("build", "createClasspathManifest", "dokka-plugin-classpath.txt") -val dokkaFatJarPathData = pluginClasspathData.resolveSibling("fatjar.txt") +val dokkaFatJarPathData: Path = pluginClasspathData.resolveSibling("fatjar.txt") val androidLocalProperties = testDataFolder.resolve("android.local.properties").let { if (Files.exists(it)) it else null } diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt index 2a4ce712..9bc52273 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt @@ -2,8 +2,6 @@ package org.jetbrains.dokka.gradle import org.gradle.testkit.runner.TaskOutcome import org.junit.Test -import java.nio.file.Path -import java.nio.file.Paths import kotlin.test.assertEquals class AndroidLibDependsOnJavaLibTest: AbstractDokkaAndroidGradleTest() { diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/BasicTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/BasicTest.kt index ebaf1653..2e1a0d41 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/BasicTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/BasicTest.kt @@ -37,10 +37,6 @@ class BasicTest : AbstractDokkaGradleTest() { """<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>""") } - @Test fun `test kotlin 1_1_2 and gradle 3_5`() { - doTest("3.5", "1.1.2") - } - @Test fun `test kotlin 1_0_7 and gradle 2_14_1`() { doTest("2.14.1", "1.0.7") } diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/MultiplatformProjectTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/MultiplatformProjectTest.kt new file mode 100644 index 00000000..3e61d79e --- /dev/null +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/MultiplatformProjectTest.kt @@ -0,0 +1,54 @@ +package org.jetbrains.dokka.gradle + +import org.gradle.testkit.runner.TaskOutcome +import org.junit.Test +import java.io.File +import kotlin.test.assertEquals + +class MultiplatformProjectTest : AbstractDokkaGradleTest() { + + fun prepareTestData(testDataRootPath: String) { + val testDataRoot = testDataFolder.resolve(testDataRootPath) + val tmpRoot = testProjectDir.root.toPath() + + testDataRoot.apply { + resolve("build.gradle").copy(tmpRoot.resolve("build.gradle")) + resolve("settings.gradle").copy(tmpRoot.resolve("settings.gradle")) + resolve("src").copy(tmpRoot.resolve("src")) + } + } + + private fun doTest(gradleVersion: String, kotlinVersion: String) { + val kotlinGradlePlugin = pluginClasspathData.resolveSibling("kotlin-gradle.txt").toFile().readLines().map { File(it) } + prepareTestData("multiplatformProject") + + // Remove withDebug(false) when https://github.com/gradle/gradle/issues/6862 is solved + val result = configure(gradleVersion, kotlinVersion, arguments = arrayOf("dokka", "--stacktrace")) + .withDebug(false) + .withPluginClasspath(pluginClasspath.union(kotlinGradlePlugin)) + .build() + + println(result.output) + + assertEquals(TaskOutcome.SUCCESS, result.task(":dokka")?.outcome) + + val docsOutput = "build/dokka" + + checkOutputStructure("multiplatformProject/fileTree.txt", docsOutput) + + checkNoErrorClasses(docsOutput) + checkNoUnresolvedLinks(docsOutput) + } + + @Test fun `test kotlin 1_3_30 and gradle 4_7`() { + doTest("4.7", "1.3.30") + } + + @Test fun `test kotlin 1_3_40 and gradle 4_10_3`() { + doTest("4.10.3", "1.3.40") + } + + @Test fun `test kotlin 1_3_40 and gradle 5_6_1`() { + doTest("5.6.1", "1.3.50") + } +}
\ No newline at end of file diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/RebuildAfterSourceChangeTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/RebuildAfterSourceChangeTest.kt index f712998c..8b2db560 100644 --- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/RebuildAfterSourceChangeTest.kt +++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/RebuildAfterSourceChangeTest.kt @@ -30,7 +30,7 @@ class RebuildAfterSourceChangeTest : AbstractDokkaGradleTest() { } - configure(gradleVersion, kotlinVersion, arguments = arrayOf("dokka", "--stacktrace")).build().let { result -> + configure(gradleVersion, kotlinVersion, arguments = arrayOf("dokka", "-i", "--stacktrace")).build().let { result -> println(result.output) assertEquals(TaskOutcome.UP_TO_DATE, result.task(":dokka")?.outcome) @@ -53,13 +53,13 @@ class RebuildAfterSourceChangeTest : AbstractDokkaGradleTest() { @Test - fun `test kotlin 1_1_2 and gradle 3_5`() { - doTest("3.5", "1.1.2") + fun `test kotlin 1_0_7 and gradle 2_14_1`() { + doTest("2.14.1", "1.0.7") } @Test - fun `test kotlin 1_0_7 and gradle 2_14_1`() { - doTest("2.14.1", "1.0.7") + fun `test kotlin 1_1_2 and gradle 3_5`() { + doTest("3.5", "1.1.2") } @Test 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() } }) } |