File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
55import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
66import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
77import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
8- import java.io.ByteArrayOutputStream
98import java.util.Properties
109
1110plugins {
@@ -171,14 +170,9 @@ compose.desktop {
171170 }
172171}
173172
174-
175173fun getGitCommitCount (): Int {
176- val out = ByteArrayOutputStream ()
177- exec {
178- commandLine(" git" , " rev-list" , " --count" , " HEAD" )
179- standardOutput = out
180- }
181- return out .toString().trim().toInt()
174+ val process = Runtime .getRuntime().exec(" git rev-list --count HEAD" )
175+ return process.inputStream.bufferedReader().use { it.readText().trim().toInt() }
182176}
183177
184178fun getVersionCode (): Int {
You can’t perform that action at this time.
0 commit comments