Build: Fix Ide performance tests configuration for jps build
This commit is contained in:
+49
-46
@@ -7,6 +7,49 @@ repositories {
|
|||||||
maven("https://jetbrains.bintray.com/markdown")
|
maven("https://jetbrains.bintray.com/markdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" {
|
||||||
|
projectDefault()
|
||||||
|
java.srcDirs(
|
||||||
|
"idea-completion/src",
|
||||||
|
"idea-live-templates/src",
|
||||||
|
"idea-repl/src"
|
||||||
|
)
|
||||||
|
resources.srcDirs(
|
||||||
|
"idea-completion/resources",
|
||||||
|
"idea-live-templates/resources",
|
||||||
|
"idea-repl/resources"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
"test" {
|
||||||
|
projectDefault()
|
||||||
|
java.srcDirs(
|
||||||
|
"idea-completion/tests",
|
||||||
|
"idea-live-templates/tests"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
"performanceTest" {
|
||||||
|
java.srcDirs("performanceTests")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
val performanceTestCompile by configurations
|
||||||
|
performanceTestCompile.apply {
|
||||||
|
extendsFrom(configurations["testCompile"])
|
||||||
|
}
|
||||||
|
|
||||||
|
val performanceTestCompileOnly by configurations
|
||||||
|
performanceTestCompile.apply {
|
||||||
|
extendsFrom(configurations["testCompileOnly"])
|
||||||
|
}
|
||||||
|
|
||||||
|
val performanceTestRuntime by configurations
|
||||||
|
performanceTestRuntime.apply {
|
||||||
|
extendsFrom(configurations["testRuntime"])
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
testRuntime(intellijRuntimeAnnotations())
|
testRuntime(intellijRuntimeAnnotations())
|
||||||
@@ -129,49 +172,9 @@ dependencies {
|
|||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("smali"))
|
testRuntime(intellijPluginDep("smali"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
performanceTestCompile(sourceSets["test"].output)
|
||||||
"main" {
|
performanceTestCompile(sourceSets["main"].output)
|
||||||
projectDefault()
|
|
||||||
java.srcDirs(
|
|
||||||
"idea-completion/src",
|
|
||||||
"idea-live-templates/src",
|
|
||||||
"idea-repl/src"
|
|
||||||
)
|
|
||||||
resources.srcDirs(
|
|
||||||
"idea-completion/resources",
|
|
||||||
"idea-live-templates/resources",
|
|
||||||
"idea-repl/resources"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
"test" {
|
|
||||||
projectDefault()
|
|
||||||
java.srcDirs(
|
|
||||||
"idea-completion/tests",
|
|
||||||
"idea-live-templates/tests"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
val performanceTestCompile by configurations.creating {
|
|
||||||
extendsFrom(configurations["testCompile"])
|
|
||||||
}
|
|
||||||
|
|
||||||
val performanceTestRuntime by configurations.creating {
|
|
||||||
extendsFrom(configurations["testRuntime"])
|
|
||||||
}
|
|
||||||
|
|
||||||
val performanceTest by run {
|
|
||||||
sourceSets.creating {
|
|
||||||
compileClasspath += sourceSets["test"].output
|
|
||||||
compileClasspath += sourceSets["main"].output
|
|
||||||
runtimeClasspath += sourceSets["test"].output
|
|
||||||
runtimeClasspath += sourceSets["main"].output
|
|
||||||
java.srcDirs("performanceTests")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
@@ -179,12 +182,12 @@ projectTest(parallel = true) {
|
|||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
projectTest(taskName = "performanceTest") {
|
projectTest(taskName = "performanceTest") {
|
||||||
dependsOn(":dist")
|
dependsOn(":dist")
|
||||||
dependsOn(performanceTest.output)
|
dependsOn(performanceTestRuntime)
|
||||||
testClassesDirs = performanceTest.output.classesDirs
|
|
||||||
classpath = performanceTest.runtimeClasspath
|
testClassesDirs = sourceSets["performanceTest"].output.classesDirs
|
||||||
|
classpath = performanceTestRuntime
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
|
|
||||||
jvmArgs?.removeAll { it.startsWith("-Xmx") }
|
jvmArgs?.removeAll { it.startsWith("-Xmx") }
|
||||||
|
|||||||
Reference in New Issue
Block a user