This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LauncherPredicate @Inject constructor(private val appVersion: String) : Predicate<Launcher> { | |
private val semVerMatcher = "(\\d+)\\.(\\d+)\\.(\\d+)".toRegex() | |
override fun test(launcher: Launcher): Boolean { | |
val version = launcher.minAppVersion | |
if (version.isNullOrEmpty()) { | |
return true | |
} | |
return runCatching { |