Skip to content

Commit

Permalink
fix: Fix crash when dexing is used with special android platforms ver…
Browse files Browse the repository at this point in the history
…sions
  • Loading branch information
phinner committed Sep 16, 2024
1 parent b142df8 commit 2f9b18d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/xpdustry/toxopid/task/DexJar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public open class DexJar : DefaultTask() {

val (platform, version) =
Path(sdk).resolve("platforms").listDirectoryEntries()
.map { it to it.fileName.toString().removePrefix("android-").toInt() }
.map { it to it.fileName.toString().removePrefix("android-").split("-")[0].toInt() }
.maxByOrNull { it.second }
?: error("No Android SDK found")

Expand Down

0 comments on commit 2f9b18d

Please sign in to comment.