Skip to content

Commit

Permalink
use --release to target a java version
Browse files Browse the repository at this point in the history
  • Loading branch information
soloturn committed Feb 4, 2022
1 parent 7ea36d5 commit 20725cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {

group = "net.sourceforge.plantuml"
description = "PlantUML"
java.sourceCompatibility = JavaVersion.VERSION_1_7

java {
withSourcesJar()
Expand Down Expand Up @@ -50,6 +49,10 @@ sourceSets {
}
}

tasks.compileJava {
options.release.set(8)
}

tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "net.sourceforge.plantuml.Run"
Expand Down
22 changes: 1 addition & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@
</parent>
<properties>
<finalName>${project.artifactId}-${project.version}</finalName>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.testSource>1.8</maven.compiler.testSource>
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
<maven.compiler.release>8</maven.compiler.release>
<main.class>net.sourceforge.plantuml.Run</main.class>
</properties>
<dependencyManagement>
Expand Down Expand Up @@ -235,23 +232,6 @@
</plugins>
</build>
<profiles>
<profile>
<!--
Kludge to make 1.8 tests with 1.7 source work nicer in IntelliJ
See https://youtrack.jetbrains.com/issue/IDEA-85478
-->
<id>intellij</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>idea.maven.embedder.version</name>
</property>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</profile>
<profile>
<id>pdf</id>
<activation>
Expand Down

0 comments on commit 20725cc

Please sign in to comment.