Files
kotlin-fork/compiler/tests-java8/build.gradle.kts
T
Dmitriy Novozhilov e933c7b6d9 [Build] Remove testApi(intellijDep()) dependencies from all modules
Since IDEA moved most of it's jars to java 11 it's illegal to use them
  in our dependencies, so all modules which use `intellijDep()` should
  carefully specify which jars they use
2021-09-30 14:41:31 +03:00

60 lines
1.8 KiB
Kotlin

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testApi(project(":kotlin-scripting-compiler"))
testApi(projectTests(":compiler:tests-common"))
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
testApi(projectTests(":generators:test-generator"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(toolsJar())
testRuntimeOnly(intellijPluginDep("java"))
if (isIdeaActive) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
}
sourceSets {
"main" {}
"test" { projectDefault() }
}
projectTest(parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateJava8TestsKt")
val generateKotlinUseSiteFromJavaOnesForJspecifyTests by generator("org.jetbrains.kotlin.generators.tests.GenerateKotlinUseSitesFromJavaOnesForJspecifyTestsKt")
task<Exec>("downloadJspecifyTests") {
val tmpDirPath = createTempDir().absolutePath
doFirst {
executable("git")
args("clone", "https://github.com/jspecify/jspecify/", tmpDirPath)
}
doLast {
copy {
from("$tmpDirPath/samples")
into("${project.rootDir}/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java")
}
}
}
val test: Test by tasks
test.apply {
exclude("**/*JspecifyAnnotationsTestGenerated*")
}
task<Test>("jspecifyTests") {
workingDir(project.rootDir)
include("**/*JspecifyAnnotationsTestGenerated*")
}
testsJar()