refactor: rename class and move to sub-package

This commit is contained in:
oSumAtrIX 2022-07-12 00:04:22 +02:00
parent e6029d6716
commit a5ab78188d
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 5 additions and 3 deletions

View File

@ -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 |")
}

View File

@ -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 {