mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Read plugin version from MANIFEST
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import java.util.jar.Manifest
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
@@ -9,6 +11,13 @@ subprojects {
|
||||
compileOnly(project(":plugin-api"))
|
||||
}
|
||||
|
||||
// Read the version from the MANIFEST.MF file in resources
|
||||
val manifestFile = file("src/main/resources/MANIFEST.MF")
|
||||
val manifestVersion: String? = if (manifestFile.exists()) {
|
||||
Manifest(manifestFile.inputStream()).mainAttributes.getValue("Plugin-Version")
|
||||
} else null
|
||||
version = manifestVersion ?: "1.0-SNAPSHOT"
|
||||
|
||||
tasks.jar {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
isZip64 = true
|
||||
|
||||
Reference in New Issue
Block a user