aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-integration-tests/build.gradle
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-01-17 15:01:18 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-01-20 08:34:33 +0100
commit4417ab37e0e16663bde81efd5207c0e1929b881a (patch)
tree883e76b7a33d8ece6c8a8c8756be61c5ab5d6c88 /runners/gradle-integration-tests/build.gradle
parent0e125fce5c09b1a0a8413d2e6be443e29d4ebebe (diff)
downloaddokka-4417ab37e0e16663bde81efd5207c0e1929b881a.tar.gz
dokka-4417ab37e0e16663bde81efd5207c0e1929b881a.tar.bz2
dokka-4417ab37e0e16663bde81efd5207c0e1929b881a.zip
Move the Gradle integration tests back to `:runners`
Diffstat (limited to 'runners/gradle-integration-tests/build.gradle')
-rw-r--r--runners/gradle-integration-tests/build.gradle60
1 files changed, 60 insertions, 0 deletions
diff --git a/runners/gradle-integration-tests/build.gradle b/runners/gradle-integration-tests/build.gradle
new file mode 100644
index 00000000..70213d8b
--- /dev/null
+++ b/runners/gradle-integration-tests/build.gradle
@@ -0,0 +1,60 @@
+apply plugin: 'kotlin'
+
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = language_version
+ apiVersion = language_version
+ jvmTarget = "1.8"
+ }
+}
+
+configurations {
+ dokkaPlugin
+ dokkaFatJar
+ kotlinGradle
+}
+
+dependencies {
+
+ testCompileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_for_gradle_runtime_version
+ testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_for_gradle_runtime_version
+ testCompile ideaRT()
+
+ dokkaPlugin project(path: ':runners: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()
+}
+
+
+
+task createClasspathManifest {
+ def outputDir = file("$buildDir/$name")
+
+ 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/fatjar.txt").text = configurations.dokkaFatJar.join("\n")
+ file("$outputDir/kotlin-gradle.txt").text = configurations.kotlinGradle.join("\n")
+ }
+}
+
+
+createClasspathManifest.mustRunAfter project(":runners:fatjar").getTasksByName("shadowJar", true)
+testClasses.dependsOn project(":runners:fatjar").shadowJar
+testClasses.dependsOn createClasspathManifest
+
+test {
+ systemProperty "android.licenses.overwrite", project.findProperty("android.licenses.overwrite") ?: ""
+ inputs.dir(file('testData'))
+ exclude '*' // TODO: Remove this exclude when tests are migrated
+} \ No newline at end of file