@@ -11,23 +11,21 @@ val BRANCH_NAME = "kotlin-nightlies"
11
11
12
12
fun bumpVersions () {
13
13
val kotlinVersion =
14
- getLatestVersion(" https://redirector.kotlinlang.org/maven/dev/org/jetbrains/kotlin/kotlin-stdlib/maven-metadata.xml" , prefix = " 2.2.20-RC " )
14
+ getLatestVersion(" https://redirector.kotlinlang.org/maven/dev/org/jetbrains/kotlin/kotlin-stdlib/maven-metadata.xml" , prefix = " 2.3.0-dev " )
15
15
16
16
val useKspSnapshots = false
17
17
val kspVersion = getLatestVersion(
18
18
if (useKspSnapshots) {
19
19
" https://oss.sonatype.org/content/repositories/snapshots/com/google/devtools/ksp/com.google.devtools.ksp.gradle.plugin/maven-metadata.xml"
20
20
} else {
21
21
" https://repo1.maven.org/maven2/com/google/devtools/ksp/com.google.devtools.ksp.gradle.plugin/maven-metadata.xml"
22
- },
23
- prefix = " 2.2.20"
22
+ }
24
23
)
25
24
26
25
File (" gradle/libraries.toml" ).let { file ->
27
26
file.writeText(
28
27
file.readText()
29
28
.replaceVersion(" kotlin-plugin" , kotlinVersion)
30
- .replaceVersion(" kotlin-plugin-max" , kotlinVersion)
31
29
.replaceVersion(" ksp" , kspVersion)
32
30
)
33
31
}
@@ -77,7 +75,9 @@ fun getLatestVersion(url: String, prefix: String? = null): String {
77
75
}
78
76
79
77
fun runCommand (vararg args : String ): String {
78
+ println (" Running command: '${args.joinToString(" " )} '" )
80
79
val builder = ProcessBuilder (* args)
80
+ .redirectErrorStream(true )
81
81
.redirectError(ProcessBuilder .Redirect .INHERIT )
82
82
val process = builder.start()
83
83
val output = StringBuilder ()
@@ -88,7 +88,7 @@ fun runCommand(vararg args: String): String {
88
88
}
89
89
val ret = process.waitFor()
90
90
if (ret != 0 ) {
91
- throw Exception (" command ${args.joinToString(" " )} failed:\n $output " )
91
+ throw Exception (" command ${args.joinToString(" " )} failed (ret= $ret ) :\n $output " )
92
92
}
93
93
return output.toString().trim()
94
94
}
0 commit comments