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

build.gradle.kts, project uses tab, not space indent

This commit is contained in:
soloturn 2022-02-11 11:13:46 +01:00
parent 12fce2cfd6
commit ad222ccc1b

View File

@ -7,54 +7,54 @@
val javacRelease = (project.findProperty("javacRelease") ?: "8") as String val javacRelease = (project.findProperty("javacRelease") ?: "8") as String
plugins { plugins {
java java
`maven-publish` `maven-publish`
signing signing
} }
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
compileOnly("org.apache.ant:ant:1.10.12") compileOnly("org.apache.ant:ant:1.10.12")
testImplementation("org.assertj:assertj-core:3.22.0") testImplementation("org.assertj:assertj-core:3.22.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2") testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.scilab.forge:jlatexmath:1.0.7")
} }
group = "net.sourceforge.plantuml" group = "net.sourceforge.plantuml"
description = "PlantUML" description = "PlantUML"
java { java {
withSourcesJar() withSourcesJar()
withJavadocJar() withJavadocJar()
} }
sourceSets { sourceSets {
main { main {
java { java {
srcDirs("src") srcDirs("src")
} }
resources { resources {
srcDirs("src") srcDirs("src")
include("**/graphviz.dat") include("**/graphviz.dat")
include("**/*.png") include("**/*.png")
include("**/*.svg") include("**/*.svg")
include("**/*.txt") include("**/*.txt")
} }
} }
test { test {
java { java {
srcDirs("test") srcDirs("test")
} }
resources { resources {
srcDirs(".") srcDirs(".")
include("skin/**/*.skin") include("skin/**/*.skin")
include("themes/**/*.puml") include("themes/**/*.puml")
} }
} }
} }
tasks.compileJava { tasks.compileJava {
@ -66,50 +66,50 @@ tasks.compileJava {
} }
tasks.withType<Jar> { tasks.withType<Jar> {
manifest { manifest {
attributes["Main-Class"] = "net.sourceforge.plantuml.Run" attributes["Main-Class"] = "net.sourceforge.plantuml.Run"
attributes["Implementation-Version"] = archiveVersion attributes["Implementation-Version"] = archiveVersion
attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version") attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version")
from("manifest.txt") from("manifest.txt")
} }
dependsOn(configurations.runtimeClasspath) dependsOn(configurations.runtimeClasspath)
from({ from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) } configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
}) })
// source sets for java and resources are on "src", only put once into the jar // source sets for java and resources are on "src", only put once into the jar
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE
from("skin") { into("skin") } from("skin") { into("skin") }
from("stdlib") { into("stdlib") } from("stdlib") { into("stdlib") }
from("svg") { into("svg") } from("svg") { into("svg") }
from("themes") { into("themes") } from("themes") { into("themes") }
} }
publishing { publishing {
publications.create<MavenPublication>("maven") { publications.create<MavenPublication>("maven") {
from(components["java"]) from(components["java"])
} }
} }
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {
options.encoding = "UTF-8" options.encoding = "UTF-8"
} }
tasks.withType<Javadoc> { tasks.withType<Javadoc> {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
addBooleanOption("Xdoclint:none", true) addBooleanOption("Xdoclint:none", true)
addStringOption("Xmaxwarns", "1") addStringOption("Xmaxwarns", "1")
} }
} }
tasks.test { tasks.test {
useJUnitPlatform() useJUnitPlatform()
testLogging.showStandardStreams = true testLogging.showStandardStreams = true
} }
signing { signing {
useGpgCmd() useGpgCmd()
sign(publishing.publications["maven"]) sign(publishing.publications["maven"])
} }