aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-integration-tests/testData
diff options
context:
space:
mode:
authorPaul Merlin <paul@gradle.com>2018-09-15 15:45:15 +0200
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2019-01-25 17:29:02 +0300
commitfa6e8ab0b0a846192d46cf9d13a0e4f01262432f (patch)
treee480b19535bf4a294e022d20599229af02e3ac9c /runners/gradle-integration-tests/testData
parentcf8279e49446e812ea43ccd4e825fbdfbf169b78 (diff)
downloaddokka-fa6e8ab0b0a846192d46cf9d13a0e4f01262432f.tar.gz
dokka-fa6e8ab0b0a846192d46cf9d13a0e4f01262432f.tar.bz2
dokka-fa6e8ab0b0a846192d46cf9d13a0e4f01262432f.zip
Add integration test for type safe configuration
by leveraging Groovy's @CompileStatic Signed-off-by: Paul Merlin <paul@gradle.com>
Diffstat (limited to 'runners/gradle-integration-tests/testData')
-rw-r--r--runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle53
-rw-r--r--runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle1
2 files changed, 54 insertions, 0 deletions
diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle
new file mode 100644
index 00000000..b5b09ff9
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle
@@ -0,0 +1,53 @@
+import org.jetbrains.dokka.*
+import org.jetbrains.dokka.gradle.*
+import org.jetbrains.kotlin.gradle.tasks.*
+
+import groovy.transform.CompileStatic
+import java.util.concurrent.Callable
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$test_kotlin_version"
+ }
+}
+
+plugins {
+ id 'org.jetbrains.dokka'
+}
+
+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
+ }
+ }
+}
+
+configureDokkaTypeSafely(project)
diff --git a/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle b/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle
new file mode 100644
index 00000000..be82e328
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "type-safe-configuration" \ No newline at end of file