aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-integration-tests
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-integration-tests')
-rw-r--r--runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt14
-rw-r--r--runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle116
2 files changed, 64 insertions, 66 deletions
diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt
index ab8bc62b..7b179e92 100644
--- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt
+++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt
@@ -1,10 +1,8 @@
package org.jetbrains.dokka.gradle
-import org.gradle.testkit.runner.TaskOutcome
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-import kotlin.test.assertEquals
@RunWith(Parameterized::class)
class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaGradleTest() {
@@ -25,14 +23,14 @@ class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaG
@Test
fun test() {
- testDataFolder.resolve("typeSafeConfiguration").toFile().copyRecursively(testProjectDir.root)
+
+ testDataFolder.resolve("typeSafeConfiguration").toFile()
+ .copyRecursively(testProjectDir.root)
+
configure(
testCase.gradleVersion,
testCase.kotlinVersion,
arguments = arrayOf("help", "-s")
- ).build().apply {
- println(output)
- assertEquals(TaskOutcome.SUCCESS, task(":help")?.outcome)
- }
+ ).build()
}
-} \ 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 923c07d8..327cead8 100644
--- a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle
+++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle
@@ -21,64 +21,64 @@ plugins {
apply plugin: 'kotlin'
@CompileStatic
-def configureDokkaTypeSafely(Project project) {
- project.tasks.withType(DokkaTask) { 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()
- jdkVersion = 6
- sourceDirs = Collections.<File>emptyList()
- sourceRoots = new ArrayList<SourceRoot>()
- dokkaFatJar = file("some File")
- includeNonPublic = false
- skipDeprecated = false
- skipEmptyPackages = true
- reportUndocumented = true
- perPackageOptions = new ArrayList<PackageOptions>()
- impliedPlatforms = Collections.<String>emptyList()
- 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>() {
- @Override
- void execute(LinkMapping mapping) {
- mapping.dir = "some String"
- mapping.url = "some String"
- }
- })
- sourceRoot(new Action<SourceRoot>() {
- @Override
- void execute(SourceRoot sourceRoot) {
- sourceRoot.path = "some String"
- }
- })
- packageOptions(new Action<PackageOptions>() {
- @Override
- void execute(PackageOptions packageOptions) {
- packageOptions.prefix = "some String"
- }
- })
- externalDocumentationLink(new Action<DokkaConfiguration.ExternalDocumentationLink.Builder>() {
- @Override
- void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) {
- builder.url = uri("some URI").toURL()
- }
- })
- }
+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()
+ jdkVersion = 6
+ sourceDirs = Collections.<File>emptyList()
+ sourceRoots = new ArrayList<SourceRoot>()
+ dokkaFatJar = file("some File")
+ includeNonPublic = false
+ skipDeprecated = false
+ skipEmptyPackages = true
+ reportUndocumented = true
+ perPackageOptions = new ArrayList<PackageOptions>()
+ impliedPlatforms = Collections.<String>emptyList()
+ 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>() {
+ @Override
+ void execute(LinkMapping mapping) {
+ mapping.dir = "some String"
+ mapping.url = "some String"
+ }
+ })
+ sourceRoot(new Action<SourceRoot>() {
+ @Override
+ void execute(SourceRoot sourceRoot) {
+ sourceRoot.path = "some String"
+ }
+ })
+ packageOptions(new Action<PackageOptions>() {
+ @Override
+ void execute(PackageOptions packageOptions) {
+ packageOptions.prefix = "some String"
+ }
+ })
+ externalDocumentationLink(new Action<DokkaConfiguration.ExternalDocumentationLink.Builder>() {
+ @Override
+ void execute(DokkaConfiguration.ExternalDocumentationLink.Builder builder) {
+ builder.url = uri("some URI").toURL()
+ }
+ })
}
}
-configureDokkaTypeSafely(project)
+project.tasks.withType(DokkaTask) { dokka ->
+ configureDokkaTypeSafely(dokka)
+}