All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.malinskiy.marathon.config.environment.SystemEnvironmentReader.kt Maven / Gradle / Ivy

package com.malinskiy.marathon.config.environment

import java.io.File

class SystemEnvironmentReader(
    private val environment: (String) -> String? = { System.getenv(it) }
) : EnvironmentReader {
    override fun read() = EnvironmentConfiguration(
        androidSdk = androidSdkPath()?.let { File(it) }
    )

    private fun androidSdkPath() =
        environment("ANDROID_HOME") ?: environment("ANDROID_SDK_ROOT")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy