From 8479cf08983519e813edd6668c016ff0a6e998f5 Mon Sep 17 00:00:00 2001 From: soloturn Date: Sun, 9 Jan 2022 13:43:44 +0100 Subject: [PATCH] build.gradle.kts, include manifest.txt, Build-Jdk-Spec the manifest classpath is to accomodate running it with pdf or not. mvn can build via a profile. when building a binary without pdf, the dependencies could be added later, and plantuml would know it anyway as they are listed in the manifest. the gradle way would be to use variant aware builds, predominatntly this is used for android builds. multi-release builds are not something for plantuml: * https://developer.android.com/studio/build/build-variants * https://docs.gradle.org/current/userguide/variant_model.html * https://blog.gradle.org/mrjars --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d6a9acc45..40dee28c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,7 +62,8 @@ tasks.withType { manifest { attributes["Main-Class"] = "net.sourceforge.plantuml.Run" attributes["Implementation-Version"] = archiveVersion - attributes["Multi-Release"] = "true" + attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version") + from("manifest.txt") } dependsOn(configurations.runtimeClasspath)