Skip to content

Commit b594d6a

Browse files
committed
🌿 Release 0.3.0
1 parent 7d0cf59 commit b594d6a

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

ReleaseNotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
3. Overseer option: `overseer`. If this option is on, the plugin will look for external reports and sources automatically following the [Overseer.md](./Overseer.md) document rules
88
4. GoLang Coverage Support (`.out` files)
99

10-
#### Release 0.3.0 - Upcoming
10+
#### Release 0.3.0 - 2022/02/14
1111

1212
1. Refactoring - Current version still has a lot of code that can be reused.
1313
2. Option `OMNI_LOG` with environment variable. Logs everything into `target/omni.log` file (Not configurable yet)

src/main/kotlin/org/jesperancinha/plugins/omni/reporter/domain/reports/OmniFileAdapters.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ internal val JAR_FILE_PATTERNS =
1919
*/
2020
internal fun File.findJarFile(): File? =
2121
JAR_FILE_PATTERNS.firstNotNullOfOrNull { pattern ->
22-
val first = this.walkTopDown()
23-
.toList().firstOrNull { file ->
22+
val allMatches = this.walkTopDown()
23+
.toList().filter { file ->
2424
val absolutePath = file.absolutePath.lowercase()
2525
absolutePath.matches(Regex(pattern)) &&
2626
!absolutePath.contains("assembly") &&
2727
!absolutePath.endsWith("sources.jar") &&
2828
!absolutePath.endsWith("javadoc.jar")
2929
}
30+
val plains = allMatches.filter { it.absolutePath.endsWith("plain.jar") }
31+
val first = if (plains.isEmpty()) allMatches.firstOrNull() else plains[0]
3032
first
3133
}
3234

0 commit comments

Comments
 (0)