Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit b093f74

Browse files
committed
fix(projects): crash when building project model and classes.jar is unavailable (fixes #1830)
1 parent 5b0a587 commit b093f74

File tree

2 files changed

+67
-12
lines changed

2 files changed

+67
-12
lines changed

.idea/other.xml

Lines changed: 66 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/impl/src/main/java/com/itsaky/androidide/tooling/impl/internal/JavaProjectImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ internal class JavaProjectImpl(
116116
}
117117

118118
jar =
119-
File(metadata.buildDir, "libs").listFiles()?.first { metadata.name?.let(it.name::startsWith) ?: false }
119+
File(metadata.buildDir, "libs").listFiles()?.firstOrNull { metadata.name?.let(it.name::startsWith) ?: false }
120120
?: File("module-jar-does-not-exist.jar")
121121

122122
return jar

0 commit comments

Comments
 (0)