mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Added Dockerfile
Added docker-compose.example.yml Implemented JAR signing with Gradle
This commit is contained in:
@@ -4,6 +4,13 @@ plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
val keystorePath: String = rootProject.file("certs/gameyfin.jks").absolutePath
|
||||
val keystoreAlias = "gameyfin-plugins"
|
||||
val keystorePassword: String = (findProperty("keystorePassword") as String?)
|
||||
?: System.getenv("GAMEYFIN_KEYSTORE_PASSWORD")
|
||||
?: ""
|
||||
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||
|
||||
@@ -56,4 +63,30 @@ subprojects {
|
||||
tasks.build {
|
||||
dependsOn("copyDependencyClasses")
|
||||
}
|
||||
|
||||
|
||||
tasks.register<Exec>("signJar") {
|
||||
dependsOn(tasks.jar)
|
||||
val jarFile = tasks.jar.get().archiveFile.get().asFile
|
||||
|
||||
// Only enable if password is present
|
||||
enabled = keystorePassword.isNotEmpty()
|
||||
|
||||
commandLine(
|
||||
"jarsigner",
|
||||
"-keystore", keystorePath,
|
||||
"-storepass", keystorePassword,
|
||||
jarFile.absolutePath,
|
||||
keystoreAlias
|
||||
)
|
||||
doFirst {
|
||||
if (keystorePassword.isEmpty()) {
|
||||
logger.lifecycle("Keystore password not provided, skipping JAR signing.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.build {
|
||||
dependsOn("signJar")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user