mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 16:20:04 +00:00
Read plugin version from MANIFEST
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import java.util.jar.Manifest
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
}
|
}
|
||||||
@@ -9,6 +11,13 @@ subprojects {
|
|||||||
compileOnly(project(":plugin-api"))
|
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 {
|
tasks.jar {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
isZip64 = true
|
isZip64 = true
|
||||||
|
|||||||
Reference in New Issue
Block a user