Revert "Run Kotlin tests on 1.6 and 1.8 target versions"
This reverts commit f92ad05c4fd126f5760fd989ee096d79b426f668.
Reason for revert: fails on Windows due to dx incompatibility
Bug: 71894643
Change-Id: Id7fcbc3a8f66b552c8b8ec24d19023bccca6681b
diff --git a/build.gradle b/build.gradle
index af7bb41..e0d28fa 100644
--- a/build.gradle
+++ b/build.gradle
@@ -793,33 +793,25 @@
include "**/*.class"
}
def kotlinResourcesDir = file("src/test/debugTestResourcesKotlin")
- kotlin.Kotlinc.KotlinTargetVersion.values().each { kotlinTargetVersion ->
- def kotlinHostJar = "debug_test_resources_kotlin_${kotlinTargetVersion}.jar"
- def taskName = "jar_debugTestResourcesKotlin_${kotlinTargetVersion}"
- task "$taskName"(type: kotlin.Kotlinc) {
- source = fileTree(dir: kotlinResourcesDir, include: '**/*.kt')
- destination = file("build/test/${kotlinHostJar}")
- targetVersion = kotlinTargetVersion;
- }
- dependsOn taskName
+ def kotlinHostJar = "debug_test_resources_kotlin.jar"
+ task "jar_debugTestResourcesKotlin"(type: kotlin.Kotlinc) {
+ source = fileTree(dir: kotlinResourcesDir, include: '**/*.kt')
+ destination = file("build/test/${kotlinHostJar}")
}
dependsOn downloadDeps
dependsOn jar_debugTestResources
dependsOn jar_debugTestResourcesJava8
+ dependsOn jar_debugTestResourcesKotlin
}
task buildExampleKotlinJars {
def kotlinSrcDir = file("src/test/examplesKotlin")
kotlinSrcDir.eachDir { dir ->
- kotlin.Kotlinc.KotlinTargetVersion.values().each { kotlinTargetVersion ->
- def name = dir.getName();
- def taskName = "compile_example_kotlin_${name}_${kotlinTargetVersion}"
- dependsOn taskName
- task "${taskName}"(type: kotlin.Kotlinc) {
- source = fileTree(dir: file("src/test/examplesKotlin/${name}"), include: '**/*.kt')
- destination = file("build/test/examplesKotlin/${kotlinTargetVersion}/${name}.jar")
- targetVersion = kotlinTargetVersion;
- }
+ def name = dir.getName();
+ dependsOn "compile_example_kotlin_${name}"
+ task "compile_example_kotlin_${name}"(type: kotlin.Kotlinc) {
+ source = fileTree(dir: file("src/test/examplesKotlin/${name}"), include: '**/*.kt')
+ destination = file("build/test/examplesKotlin/${name}.jar")
}
}
}
@@ -1123,23 +1115,20 @@
}
def examplesDir = file("src/test/examplesKotlin")
examplesDir.eachDir { dir ->
- kotlin.Kotlinc.KotlinTargetVersion.values().each { kotlinTargetVersion ->
- def name = dir.getName();
- def compileTaskName = "compile_example_kotlin_${name}_${kotlinTargetVersion}"
- def dexTaskName = "dex_example_kotlin_${name}_${kotlinTargetVersion}"
- dependsOn dexTaskName
- def exampleOutputDir = file("build/test/examplesKotlin/${kotlinTargetVersion}/" + name);
- def dexPath = file("${exampleOutputDir}")
- task "${dexTaskName}"(type: dx.Dx, dependsOn: "${compileTaskName}") {
- doFirst {
- if (!dexPath.exists()) {
- dexPath.mkdirs()
- }
+ def name = dir.getName();
+ dependsOn "dex_example_kotlin_${name}"
+ def exampleOutputDir = file("build/test/examplesKotlin/" + name);
+ def dexPath = file("${exampleOutputDir}")
+ task "dex_example_kotlin_${name}"(type: dx.Dx,
+ dependsOn: "compile_example_kotlin_${name}") {
+ doFirst {
+ if (!dexPath.exists()) {
+ dexPath.mkdirs()
}
- source = files(tasks.getByPath("${compileTaskName}")).asFileTree
- destination = dexPath
- debug = false
}
+ source = files(tasks.getByPath("compile_example_kotlin_${name}")).asFileTree
+ destination = dexPath
+ debug = false
}
}
}