mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-17 20:05:09 -04:00
[IDEA] Enable Gradle Configuration Cache for Gradle Test Runner (#123552)
* [IDEA] Enable Gradle Configuration Cache for Gradle Runner This should speedup repetitives usages of the Gradle Runner for the majority of test executions We added a flag to disable it explicitly if it does not work for certain scenarios
This commit is contained in:
parent
84552f8d83
commit
17e35d431b
3 changed files with 12 additions and 1 deletions
|
@ -133,6 +133,9 @@ develocity {
|
|||
}
|
||||
} else {
|
||||
tag 'LOCAL'
|
||||
if (providers.systemProperty('idea.active').present) {
|
||||
tag 'IDEA'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
|
|||
|
||||
// this path is produced by the extractLibs task above
|
||||
String testLibraryPath = TestUtil.getTestLibraryPath("${elasticsearchProject.left()}/libs/native/libraries/build/platform")
|
||||
|
||||
def enableIdeaCC = providers.gradleProperty("org.elasticsearch.idea-configuration-cache").getOrElse("true").toBoolean()
|
||||
idea {
|
||||
project {
|
||||
vcs = 'Git'
|
||||
|
@ -209,6 +209,11 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
|
|||
}
|
||||
}
|
||||
runConfigurations {
|
||||
defaults(org.jetbrains.gradle.ext.Gradle) {
|
||||
scriptParameters = enableIdeaCC ? [
|
||||
'--configuration-cache'
|
||||
].join(' ') : ''
|
||||
}
|
||||
defaults(JUnit) {
|
||||
vmParameters = [
|
||||
'-ea',
|
||||
|
|
|
@ -19,3 +19,6 @@ org.gradle.dependency.verification.console=verbose
|
|||
|
||||
# allow user to specify toolchain via the RUNTIME_JAVA_HOME environment variable
|
||||
org.gradle.java.installations.fromEnv=RUNTIME_JAVA_HOME
|
||||
|
||||
# if configuration cache enabled then enable parallel support too
|
||||
org.gradle.configuration-cache.parallel=true
|
||||
|
|
Loading…
Add table
Reference in a new issue