Skip to content

Commit

Permalink
fix #973 -- NumberFormatException in JvmTaskConfiguration (#977)
Browse files Browse the repository at this point in the history
See #973
  • Loading branch information
sphrak authored Aug 12, 2024
1 parent d04654c commit f34519d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ fun Project.androidJar(askedVersion: String = ""): Provider<File> =
val platformsDir = androidHome.resolve("platforms")
val versions = platformsDir.list().orEmpty()
versions.maxByOrNull { name -> // possible name: "android-32", "android-33-ext4"
name.split("-").getOrNull(1)?.toInt() ?: 0
name.split("-").getOrNull(1)?.toIntOrNull() ?: 0
} ?: error(
buildString {
appendLine("'$platformsDir' does not contain any directories matching expected 'android-NUMBER' format: ${versions}")
Expand Down

0 comments on commit f34519d

Please sign in to comment.