feat: Add JSON meta
This commit is contained in:
@ -3,10 +3,8 @@ package app.revanced.meta.readme
|
||||
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int) {
|
||||
companion object {
|
||||
fun fromString(version: String): SemanticVersion {
|
||||
var parts = version.split(".")
|
||||
|
||||
val parts = version.split(".")
|
||||
if (parts.count() != 3) throw IllegalArgumentException("Invalid semantic version")
|
||||
|
||||
val versionNumbers = parts.map { it.toInt() }
|
||||
return SemanticVersion(versionNumbers[0], versionNumbers[1], versionNumbers[2])
|
||||
}
|
||||
|
Reference in New Issue
Block a user