Unverified Commit 1e9c1864 authored by dima.avdeev's avatar dima.avdeev Committed by GitHub

Fix GitHub Actions Linux mavenLocal test with Android step (#655)

parent 3d70417e
......@@ -778,8 +778,8 @@ fun Project.androidJar(askedVersion: String = ""): Provider<File> =
val version = if (askedVersion.isEmpty()) {
val platformsDir = androidHome.resolve("platforms")
val versions = platformsDir.list().orEmpty()
versions.maxByOrNull { name ->
name.removePrefix("android-").toInt()
versions.maxByOrNull { name -> // possible name: "android-32", "android-33-ext4"
name.split("-").getOrNull(1)?.toInt() ?: 0
} ?: error(
buildString {
appendLine("'$platformsDir' does not contain any directories matching expected 'android-NUMBER' format: ${versions}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment