Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Use system path separator instead of hardcoded. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunikkk authored Jun 18, 2018
1 parent 100df6c commit 05d1714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android/src/main/kotlin/com/gojuno/commander/android/Adb.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import java.util.concurrent.TimeUnit.MINUTES
import java.util.concurrent.TimeUnit.SECONDS

val androidHome: String by lazy { requireNotNull(System.getenv("ANDROID_HOME")) { "Please specify ANDROID_HOME env variable" } }
val adb: String by lazy { "$androidHome/platform-tools/adb" }
val adb: String by lazy { "$androidHome${File.pathSeparator}platform-tools${File.pathSeparator}adb" }
private val buildTools: String? by lazy {
File(androidHome, "build-tools")
.listFiles()
.sortedArray()
.lastOrNull()
?.absolutePath
}
val aapt: String by lazy { buildTools?.let { "$buildTools/aapt" } ?: "" }
val aapt: String by lazy { buildTools?.let { "$buildTools${File.pathSeparator}aapt" } ?: "" }

internal fun Observable<Notification>.trimmedOutput() = this
.ofType(Notification.Exit::class.java)
Expand Down

0 comments on commit 05d1714

Please sign in to comment.