com.bugsnag.android.gradle.internal.GitVersionValueSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bugsnag-android-gradle-plugin Show documentation
Show all versions of bugsnag-android-gradle-plugin Show documentation
Gradle plugin to automatically upload ProGuard mapping files to Bugsnag.
The newest version!
package com.bugsnag.android.gradle.internal
import org.gradle.api.provider.ValueSource
import org.gradle.api.provider.ValueSourceParameters
import org.gradle.process.ExecOperations
import java.io.ByteArrayOutputStream
import java.nio.charset.Charset
import javax.inject.Inject
abstract class GitVersionValueSource : ValueSource {
@get:Inject
abstract val execOperations: ExecOperations
override fun obtain(): String {
val output = ByteArrayOutputStream()
execOperations.exec {
it.commandLine("git", "--version")
it.standardOutput = output
}
return output.toString(Charset.defaultCharset())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy