mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05:30 +00:00
Fix version on continuous build
This commit is contained in:
parent
1024e68eb6
commit
93961dde2c
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import org.eclipse.jgit.api.Git
|
import org.eclipse.jgit.api.Git
|
||||||
import org.eclipse.jgit.internal.storage.file.FileRepository
|
import org.eclipse.jgit.internal.storage.file.FileRepository
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
@ -12,13 +11,14 @@ private lateinit var commitHash: String
|
|||||||
private var commitCount = 0
|
private var commitCount = 0
|
||||||
|
|
||||||
object Config {
|
object Config {
|
||||||
operator fun get(key: String) : String? {
|
operator fun get(key: String): String? {
|
||||||
val v = props[key] as? String ?: return null
|
val v = props[key] as? String ?: return null
|
||||||
return if (v.isBlank()) null else v
|
return if (v.isBlank()) null else v
|
||||||
}
|
}
|
||||||
|
|
||||||
fun contains(key: String) = get(key) != null
|
fun contains(key: String) = get(key) != null
|
||||||
|
|
||||||
val version: String = get("version") ?: commitHash
|
val version: String get() = get("version") ?: commitHash
|
||||||
val versionCode: Int get() = get("magisk.versionCode")!!.toInt()
|
val versionCode: Int get() = get("magisk.versionCode")!!.toInt()
|
||||||
val stubVersion: String get() = get("magisk.stubVersion")!!
|
val stubVersion: String get() = get("magisk.stubVersion")!!
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user