Skip to content

Commit 1bc02b8

Browse files
[perf-tests] Refactor test which uses spring project (adjust project on the test case level, not in the test itself)
GitOrigin-RevId: e6a41c2b481253923cd85294a4a819a977feb798
1 parent f995345 commit 1bc02b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

intellij.tools.ide.starter/src/com/intellij/ide/starter/ide/IDETestContext.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import com.intellij.tools.ide.performanceTesting.commands.CommandChain
2525
import com.intellij.tools.ide.performanceTesting.commands.MarshallableCommand
2626
import com.intellij.tools.ide.performanceTesting.commands.SdkObject
2727
import com.intellij.ui.NewUiValue
28+
import com.intellij.util.io.readText
2829
import kotlinx.coroutines.Deferred
2930
import kotlinx.coroutines.async
3031
import org.apache.commons.io.FileUtils
@@ -579,5 +580,18 @@ class IDETestContext(
579580

580581
return this
581582
}
583+
584+
fun updateKotlinVersionInGradleProperties(kotlinVersion: String): IDETestContext {
585+
val gradlePropertiesFile = resolvedProjectHome.resolve("gradle.properties")
586+
val textLines = gradlePropertiesFile.readLines()
587+
var text = gradlePropertiesFile.readText()
588+
textLines.forEach { line ->
589+
if (line.contains("kotlinVersion=")) {
590+
text = text.replace(line, "kotlinVersion=$kotlinVersion")
591+
}
592+
}
593+
gradlePropertiesFile.writeText(text)
594+
return this
595+
}
582596
}
583597

0 commit comments

Comments
 (0)