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/build.gradle1
-rw-r--r--runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt36
-rw-r--r--runners/gradle-integration-tests/testData/androidApp/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/androidApp/fileTree.txt1
-rw-r--r--runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt2
-rw-r--r--runners/gradle-integration-tests/testData/basic/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/sourcesChange/build.gradle4
-rw-r--r--runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle84
-rw-r--r--runners/gradle-integration-tests/testData/typeSafeConfiguration/settings.gradle1
12 files changed, 137 insertions, 12 deletions
diff --git a/runners/gradle-integration-tests/build.gradle b/runners/gradle-integration-tests/build.gradle
index a681c82e..297a175a 100644
--- a/runners/gradle-integration-tests/build.gradle
+++ b/runners/gradle-integration-tests/build.gradle
@@ -56,4 +56,5 @@ testClasses.dependsOn createClasspathManifest
test {
systemProperty "android.licenses.overwrite", project.findProperty("android.licenses.overwrite") ?: ""
+ inputs.dir(file('testData'))
} \ No newline at end of file
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
new file mode 100644
index 00000000..7b179e92
--- /dev/null
+++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/TypeSafeConfigurationTest.kt
@@ -0,0 +1,36 @@
+package org.jetbrains.dokka.gradle
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.Parameterized
+
+@RunWith(Parameterized::class)
+class TypeSafeConfigurationTest(private val testCase: TestCase) : AbstractDokkaGradleTest() {
+
+ data class TestCase(val gradleVersion: String, val kotlinVersion: String) {
+ override fun toString(): String = "Gradle $gradleVersion and Kotlin $kotlinVersion"
+ }
+
+ companion object {
+ @Parameterized.Parameters(name = "{0}")
+ @JvmStatic
+ fun testCases() = listOf(
+ TestCase("4.0", "1.1.2"),
+ TestCase("4.5", "1.2.20"),
+ TestCase("4.10.1", "1.2.60")
+ )
+ }
+
+ @Test
+ fun test() {
+
+ testDataFolder.resolve("typeSafeConfiguration").toFile()
+ .copyRecursively(testProjectDir.root)
+
+ configure(
+ testCase.gradleVersion,
+ testCase.kotlinVersion,
+ arguments = arrayOf("help", "-s")
+ ).build()
+ }
+}
diff --git a/runners/gradle-integration-tests/testData/androidApp/build.gradle b/runners/gradle-integration-tests/testData/androidApp/build.gradle
index 59477b52..35356b90 100644
--- a/runners/gradle-integration-tests/testData/androidApp/build.gradle
+++ b/runners/gradle-integration-tests/testData/androidApp/build.gradle
@@ -3,7 +3,7 @@ buildscript {
mavenCentral()
jcenter()
maven { url 'https://maven.google.com' }
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -15,7 +15,7 @@ allprojects {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
}
diff --git a/runners/gradle-integration-tests/testData/androidApp/fileTree.txt b/runners/gradle-integration-tests/testData/androidApp/fileTree.txt
index 3827b69e..f66c79e3 100644
--- a/runners/gradle-integration-tests/testData/androidApp/fileTree.txt
+++ b/runners/gradle-integration-tests/testData/androidApp/fileTree.txt
@@ -9,6 +9,7 @@
-init-.html
index.html
on-create-options-menu.html
+ on-create.html
-kotlin-activity/
-init-.html
index.html
diff --git a/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle b/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle
index 59477b52..35356b90 100644
--- a/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle
+++ b/runners/gradle-integration-tests/testData/androidAppJavadoc/build.gradle
@@ -3,7 +3,7 @@ buildscript {
mavenCentral()
jcenter()
maven { url 'https://maven.google.com' }
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -15,7 +15,7 @@ allprojects {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
}
diff --git a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle
index 59477b52..35356b90 100644
--- a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle
+++ b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/build.gradle
@@ -3,7 +3,7 @@ buildscript {
mavenCentral()
jcenter()
maven { url 'https://maven.google.com' }
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -15,7 +15,7 @@ allprojects {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
}
diff --git a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt
index 5e969d8b..77b563b2 100644
--- a/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt
+++ b/runners/gradle-integration-tests/testData/androidMultiFlavourApp/fileTree.txt
@@ -10,6 +10,7 @@
-init-.html
index.html
on-create-options-menu.html
+ on-create.html
-kotlin-activity/
-init-.html
index.html
@@ -35,6 +36,7 @@
-init-.html
index.html
on-create-options-menu.html
+ on-create.html
-kotlin-activity/
-init-.html
index.html
diff --git a/runners/gradle-integration-tests/testData/basic/build.gradle b/runners/gradle-integration-tests/testData/basic/build.gradle
index 4a259f50..a3116751 100644
--- a/runners/gradle-integration-tests/testData/basic/build.gradle
+++ b/runners/gradle-integration-tests/testData/basic/build.gradle
@@ -2,7 +2,7 @@ buildscript {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -21,7 +21,7 @@ repositories {
mavenCentral()
jcenter()
maven {
- url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
+ url "https://dl.bintray.com/kotlin/kotlin-eap-1.1"
}
maven {
url "https://dl.bintray.com/kotlin/kotlin-dev"
diff --git a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle
index 68d93e30..4f561472 100644
--- a/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle
+++ b/runners/gradle-integration-tests/testData/multiProjectSingleOut/build.gradle
@@ -7,7 +7,7 @@ subprojects {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -17,7 +17,7 @@ subprojects {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
}
diff --git a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle
index bc20e1cf..4627e8ef 100644
--- a/runners/gradle-integration-tests/testData/sourcesChange/build.gradle
+++ b/runners/gradle-integration-tests/testData/sourcesChange/build.gradle
@@ -2,7 +2,7 @@ buildscript {
repositories {
mavenCentral()
jcenter()
- maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
+ maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
@@ -21,7 +21,7 @@ repositories {
mavenCentral()
jcenter()
maven {
- url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
+ url "https://dl.bintray.com/kotlin/kotlin-eap-1.1"
}
maven {
url "https://dl.bintray.com/kotlin/kotlin-dev"
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..327cead8
--- /dev/null
+++ b/runners/gradle-integration-tests/testData/typeSafeConfiguration/build.gradle
@@ -0,0 +1,84 @@
+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(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()
+ }
+ })
+ }
+}
+
+project.tasks.withType(DokkaTask) { dokka ->
+ configureDokkaTypeSafely(dokka)
+}
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