Skip to content

Commit 0ef321f

Browse files
CristianGMSpace Team
authored andcommitted
Make :tools:kotlinp-jvm:test cacheable
^KTI-2586
1 parent bbd6c5c commit 0ef321f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

libraries/tools/kotlinp/jvm/build.gradle.kts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
import org.jetbrains.kotlin.ideaExt.idea
32

43
description = "kotlinp-jvm"
54

65
plugins {
76
kotlin("jvm")
87
id("jps-compatible")
98
id("project-tests-convention")
9+
id("test-inputs-check")
1010
}
1111

1212
val shadows by configurations.creating
@@ -45,13 +45,21 @@ sourceSets {
4545
}
4646

4747
projectTests {
48-
testTask(jUnitMode = JUnitMode.JUnit5) {
49-
workingDir = rootDir
50-
}
48+
testData(isolated, "testData")
49+
testData(project(":compiler").isolated, "testData/loadJava")
50+
testData(project(":compiler").isolated, "testData/serialization")
51+
52+
testTask(jUnitMode = JUnitMode.JUnit5)
5153

5254
testGenerator("org.jetbrains.kotlin.kotlinp.jvm.test.GenerateKotlinpTestsKt", doNotSetFixturesSourceSetDependency = true)
5355

5456
withJvmStdlibAndReflect()
57+
withScriptRuntime()
58+
withMockJdkAnnotationsJar()
59+
withTestJar()
60+
withMockJdkRuntime()
61+
withAnnotations()
62+
withScriptingPlugin()
5563
}
5664

5765
val shadowJar by task<ShadowJar> {
@@ -69,10 +77,6 @@ tasks {
6977
"assemble" {
7078
dependsOn(shadowJar)
7179
}
72-
"test" {
73-
// These dependencies are needed because ForTestCompileRuntime loads jars from dist
74-
dependsOn(rootProject.tasks.named("dist"))
75-
}
7680
}
7781

7882
testsJar()

0 commit comments

Comments
 (0)