File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
intellij.tools.ide.starter/src/com/intellij/ide/starter/ide Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import com.intellij.tools.ide.performanceTesting.commands.CommandChain
25
25
import com.intellij.tools.ide.performanceTesting.commands.MarshallableCommand
26
26
import com.intellij.tools.ide.performanceTesting.commands.SdkObject
27
27
import com.intellij.ui.NewUiValue
28
+ import com.intellij.util.io.readText
28
29
import kotlinx.coroutines.Deferred
29
30
import kotlinx.coroutines.async
30
31
import org.apache.commons.io.FileUtils
@@ -579,5 +580,18 @@ class IDETestContext(
579
580
580
581
return this
581
582
}
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
+ }
582
596
}
583
597
You can’t perform that action at this time.
0 commit comments