1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 10:59:01 +00:00

javac --release to build for java8, with java11+

javac since java9 has a new flat --release to build a binary which can be run
with an older java. the public API of that older release must be followed as
well.

the flags used before, -source, -target do not do this. therefor it got
unnoticed that plantuml did not compile and run in java7 any more, despite
beeing compiled for for java7.

https://github.com/plantuml/plantuml/issues/898
This commit is contained in:
soloturn 2022-02-04 01:06:44 +01:00
parent 88947b9dc7
commit 856cef2478
2 changed files with 5 additions and 4 deletions

View File

@ -18,8 +18,6 @@ dependencies {
group = "net.sourceforge.plantuml" group = "net.sourceforge.plantuml"
description = "PlantUML" description = "PlantUML"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
java { java {
withSourcesJar() withSourcesJar()
@ -51,6 +49,10 @@ sourceSets {
} }
} }
tasks.compileJava {
options.release.set(8)
}
tasks.withType<Jar> { tasks.withType<Jar> {
manifest { manifest {
attributes["Main-Class"] = "net.sourceforge.plantuml.Run" attributes["Main-Class"] = "net.sourceforge.plantuml.Run"

View File

@ -56,8 +56,7 @@
</parent> </parent>
<properties> <properties>
<finalName>${project.artifactId}-${project.version}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.release>8</maven.compiler.release>
<maven.compiler.target>1.8</maven.compiler.target>
<main.class>net.sourceforge.plantuml.Run</main.class> <main.class>net.sourceforge.plantuml.Run</main.class>
</properties> </properties>
<dependencyManagement> <dependencyManagement>