Skip to content

Commit ae09abf

Browse files
committed
Ignore Android SDK extension
1 parent d70d53b commit ae09abf

File tree

1 file changed

+2
-2
lines changed
  • booster-build/src/main/kotlin/com/didiglobal/booster/build

1 file changed

+2
-2
lines changed

booster-build/src/main/kotlin/com/didiglobal/booster/build/AndroidSdk.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class AndroidSdk {
2828

2929
fun findPlatform(): Int = File(location, "platforms").listFiles()?.filter {
3030
it.name.startsWith("android-") && File(it, "android.jar").exists()
31-
}?.map {
32-
it.name.substringAfter("android-")
31+
}?.mapNotNull {
32+
it.name.substringAfter("android-").toIntOrNull()
3333
}?.maxOrNull()?.toInt() ?: throw RuntimeException("No platform found")
3434

3535
/**

0 commit comments

Comments
 (0)