diff --git a/skiko/buildSrc/src/main/kotlin/tasks/configuration/JvmTasksConfiguration.kt b/skiko/buildSrc/src/main/kotlin/tasks/configuration/JvmTasksConfiguration.kt index c34428373..99b043b63 100644 --- a/skiko/buildSrc/src/main/kotlin/tasks/configuration/JvmTasksConfiguration.kt +++ b/skiko/buildSrc/src/main/kotlin/tasks/configuration/JvmTasksConfiguration.kt @@ -543,7 +543,7 @@ fun Project.androidJar(askedVersion: String = ""): Provider = 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}")