mirror of
https://github.com/revanced/revanced-patches
synced 2024-08-16 20:30:57 +02:00
refactor: rename class and move to sub-package
This commit is contained in:
parent
e6029d6716
commit
a5ab78188d
@ -1,7 +1,5 @@
|
||||
package app.revanced.meta.readme
|
||||
|
||||
import SemanticVersion
|
||||
import SemanticVersionComparator
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
@ -24,7 +22,9 @@ class Generator {
|
||||
val patchName = patch.patchName
|
||||
val compatiblePackage = patch.compatiblePackages?.first()
|
||||
val latestVersion =
|
||||
compatiblePackage?.versions?.map { SemanticVersion.fromString(it) }?.maxWithOrNull(SemanticVersionComparator) ?: "all"
|
||||
compatiblePackage?.versions?.map { SemanticVersion.fromString(it) }?.maxWithOrNull(
|
||||
SemanticVersionComparator
|
||||
) ?: "all"
|
||||
|
||||
patches.appendLine("| `$patchName` | ${patch.description} | `${compatiblePackage?.name}` | $latestVersion |")
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
package app.revanced.meta.readme
|
||||
|
||||
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int) {
|
||||
companion object {
|
||||
fun fromString(version: String): SemanticVersion {
|
Loading…
Reference in New Issue
Block a user