Skip to content
Snippets Groups Projects
Select Git revision
  • 983d58a83f3fb09b83d15e8dab7aaf142d1b81d5
  • master default
  • method_check
  • custom_prefix
  • package
  • cookies
  • v2.1.1
  • v2.1.0
  • v2.1.0-rc5
  • v2.1.0-rc4
  • v2.1.0-rc3
  • v2.1.0-rc2
  • v2.1.0-rc1
  • v2.0.7
  • v2.0.6
  • v2.0.5
  • v2.0.4
  • v2.0.3
  • v2.0.2
  • v2.0.1
  • v2.0.0
  • v1.2.8
  • v1.2.7
  • v1.2.6
  • v1.2.5
  • v1.2.4
26 results

oauth.go

Blame
  • ProjectHelper.kt 545 B
    import org.gradle.api.Project
    import java.io.ByteArrayOutputStream
    import java.util.*
    
    fun Project.cmd(vararg command: String) = try {
      val stdOut = ByteArrayOutputStream()
      exec {
        commandLine(*command)
        standardOutput = stdOut
      }
      stdOut.toString(Charsets.UTF_8.name()).trim()
    } catch (e: Throwable) {
      e.printStackTrace()
      null
    }
    
    fun Project.properties(fileName: String): Properties? {
      val file = file(fileName)
      if (!file.exists())
        return null
      val props = Properties()
      props.load(file.inputStream())
      return props
    }