Skip to content

Commit c75857d

Browse files
committed
Update build.gradle.kts
1 parent 11d84a6 commit c75857d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

composeApp/build.gradle.kts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
55
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
66
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
77
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
8-
import java.io.ByteArrayOutputStream
98
import java.util.Properties
109

1110
plugins {
@@ -171,14 +170,9 @@ compose.desktop {
171170
}
172171
}
173172

174-
175173
fun 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

184178
fun getVersionCode(): Int {

0 commit comments

Comments
 (0)