blob: 1bdcf25374767069d69e0cf1e600f7b8d455d5d4 [file] [log] [blame] [edit]
import org.jetbrains.kotlin.build.androidsdkprovisioner.ProvisioningType
plugins {
kotlin("jvm")
id("jps-compatible")
id("android-sdk-provisioner")
id("project-tests-convention")
}
dependencies {
testApi(project(":core:descriptors"))
testApi(project(":core:descriptors.jvm"))
testApi(project(":compiler:util"))
testApi(project(":compiler:cli"))
testApi(project(":compiler:frontend"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:incremental-compilation-impl"))
testApi(project(":compiler:frontend.java"))
testApi(kotlinStdlib())
testApi(testFixtures(project(":compiler:tests-common")))
testImplementation(libs.junit4)
testApi(testFixtures(project(":compiler:test-infrastructure")))
testApi(testFixtures(project(":compiler:test-infrastructure-utils")))
testApi(testFixtures(project(":compiler:tests-compiler-utils")))
testApi(testFixtures(project(":compiler:tests-common-new")))
testApi(jpsModel())
testRuntimeOnly(intellijCore())
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.jna:jna"))
testImplementation(libs.junit.platform.launcher)
}
sourceSets {
"main" { }
"test" { projectDefault() }
}
optInToK1Deprecation()
projectTests {
testTask(jUnitMode = JUnitMode.JUnit4) {
dependsOn(":dist")
val jdkHome = project.getToolchainJdkHomeFor(JdkMajorVersion.JDK_1_8)
doFirst {
environment("kotlin.tests.android.timeout", "45")
environment("JAVA_HOME", jdkHome.get())
}
if (project.hasProperty("teamcity") || project.hasProperty("kotlin.test.android.teamcity")) {
systemProperty("kotlin.test.android.teamcity", true)
}
project.findProperty("kotlin.test.android.path.filter")?.let {
systemProperty("kotlin.test.android.path.filter", it.toString())
}
workingDir = rootDir
androidSdkProvisioner {
provideToThisTaskAsSystemProperty(ProvisioningType.SDK_WITH_EMULATOR)
}
}
withJvmStdlibAndReflect()
}
val generateAndroidTests by generator("org.jetbrains.kotlin.android.tests.CodegenTestsOnAndroidGenerator") {
workingDir = rootDir
dependsOn(rootProject.tasks.named("dist"))
}