diff options
Diffstat (limited to 'integration-tests')
-rw-r--r-- | integration-tests/build.gradle | 7 | ||||
-rw-r--r-- | integration-tests/build.gradle.kts | 0 | ||||
-rw-r--r-- | integration-tests/gradle-integration-tests/build.gradle | 60 | ||||
-rw-r--r-- | integration-tests/gradle-integration-tests/build.gradle.kts | 52 |
4 files changed, 52 insertions, 67 deletions
diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle deleted file mode 100644 index 23d232d2..00000000 --- a/integration-tests/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -subprojects { - buildscript { - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } - } -}
\ No newline at end of file diff --git a/integration-tests/build.gradle.kts b/integration-tests/build.gradle.kts new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/integration-tests/build.gradle.kts diff --git a/integration-tests/gradle-integration-tests/build.gradle b/integration-tests/gradle-integration-tests/build.gradle deleted file mode 100644 index 70213d8b..00000000 --- a/integration-tests/gradle-integration-tests/build.gradle +++ /dev/null @@ -1,60 +0,0 @@ -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 diff --git a/integration-tests/gradle-integration-tests/build.gradle.kts b/integration-tests/gradle-integration-tests/build.gradle.kts new file mode 100644 index 00000000..6a3fc690 --- /dev/null +++ b/integration-tests/gradle-integration-tests/build.gradle.kts @@ -0,0 +1,52 @@ +val dokkaPlugin by configurations.creating +val dokkaCore by configurations.creating +val kotlinGradle by configurations.creating + +dependencies { + val kotlin_version: String by project + testCompileOnly(group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version = kotlin_version) + testImplementation( + group = "org.jetbrains.kotlin", + name = "kotlin-test-junit", + version = kotlin_version + ) + testImplementation(project(":coreDependencies")) + dokkaPlugin(project(path = ":runners:gradle-plugin")) + dokkaCore(project(path = ":core", configuration = "shadow")) + + kotlinGradle("org.jetbrains.kotlin:kotlin-gradle-plugin") + + testImplementation(group = "junit", name = "junit", version = "4.13") + testImplementation(gradleTestKit()) +} + + +val createClasspathManifest by tasks.registering { + dependsOn(project(":core").getTasksByName("shadowJar", true)) + + val outputDir = file("$buildDir/$name") + inputs.files(dokkaPlugin + dokkaCore) + outputs.dir(outputDir) + + doLast { + outputDir.mkdirs() + file("$outputDir/dokka-plugin-classpath.txt").writeText(dokkaPlugin.joinToString("\n")) + file("$outputDir/fatjar.txt").writeText(dokkaCore.joinToString("\n")) + file("$outputDir/kotlin-gradle.txt").writeText(kotlinGradle.joinToString("\n")) + } +} + +val testClasses by tasks.getting + +testClasses.dependsOn(project(":core").getTasksByName("shadowJar", true)) +testClasses.dependsOn(createClasspathManifest) + +tasks { + test { + systemProperty("android.licenses.overwrite", project.findProperty("android.licenses.overwrite") ?: "") + inputs.dir(file("testData")) + exclude("*") // TODO: Remove this exclude when tests are migrated + } +} + +// TODO: see if this file makes any sense
\ No newline at end of file |