2022-01-05 17:28:46 +00:00
|
|
|
plugins {
|
2022-01-07 01:28:13 +00:00
|
|
|
java
|
|
|
|
`maven-publish`
|
2022-01-15 09:23:57 +00:00
|
|
|
signing
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2022-01-07 01:28:13 +00:00
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-01-07 01:28:13 +00:00
|
|
|
compileOnly("org.apache.ant:ant:1.10.12")
|
2022-01-09 00:39:22 +00:00
|
|
|
testImplementation("org.assertj:assertj-core:3.22.0")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
2022-01-07 01:28:13 +00:00
|
|
|
testImplementation("org.scilab.forge:jlatexmath:1.0.7")
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "net.sourceforge.plantuml"
|
|
|
|
description = "PlantUML"
|
|
|
|
|
|
|
|
java {
|
2022-01-07 01:28:13 +00:00
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
2022-01-07 01:28:13 +00:00
|
|
|
main {
|
|
|
|
java {
|
2022-02-03 06:21:32 +00:00
|
|
|
srcDirs("src")
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
2022-01-07 01:28:13 +00:00
|
|
|
resources {
|
|
|
|
srcDirs("src")
|
|
|
|
include("**/graphviz.dat")
|
|
|
|
include("**/*.png")
|
|
|
|
include("**/*.svg")
|
|
|
|
include("**/*.txt")
|
|
|
|
}
|
|
|
|
}
|
2022-01-07 01:51:54 +00:00
|
|
|
test {
|
|
|
|
java {
|
2022-02-03 06:21:32 +00:00
|
|
|
srcDirs("test")
|
2022-01-07 01:51:54 +00:00
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDirs(".")
|
|
|
|
include("skin/**/*.skin")
|
|
|
|
include("themes/**/*.puml")
|
|
|
|
}
|
|
|
|
}
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
2022-02-04 00:06:44 +00:00
|
|
|
tasks.compileJava {
|
|
|
|
options.release.set(8)
|
|
|
|
}
|
|
|
|
|
2022-01-05 17:28:46 +00:00
|
|
|
tasks.withType<Jar> {
|
2022-01-07 01:28:13 +00:00
|
|
|
manifest {
|
|
|
|
attributes["Main-Class"] = "net.sourceforge.plantuml.Run"
|
|
|
|
attributes["Implementation-Version"] = archiveVersion
|
2022-01-09 12:43:44 +00:00
|
|
|
attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version")
|
|
|
|
from("manifest.txt")
|
2022-01-07 01:28:13 +00:00
|
|
|
}
|
2022-01-05 17:28:46 +00:00
|
|
|
|
2022-01-07 01:28:13 +00:00
|
|
|
dependsOn(configurations.runtimeClasspath)
|
|
|
|
from({
|
|
|
|
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
|
|
|
})
|
2022-01-05 17:28:46 +00:00
|
|
|
|
2022-02-03 06:21:32 +00:00
|
|
|
// source sets for java and resources are on "src", only put once into the jar
|
|
|
|
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE
|
2022-01-07 01:28:13 +00:00
|
|
|
from("skin") { into("skin") }
|
|
|
|
from("stdlib") { into("stdlib") }
|
|
|
|
from("svg") { into("svg") }
|
|
|
|
from("themes") { into("themes") }
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
2022-01-07 01:28:13 +00:00
|
|
|
publications.create<MavenPublication>("maven") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<JavaCompile> {
|
2022-01-07 01:28:13 +00:00
|
|
|
options.encoding = "UTF-8"
|
2022-01-05 17:28:46 +00:00
|
|
|
}
|
2022-01-06 23:36:03 +00:00
|
|
|
|
|
|
|
tasks.withType<Javadoc> {
|
2022-01-07 01:28:13 +00:00
|
|
|
options {
|
|
|
|
this as StandardJavadocDocletOptions
|
2022-02-08 08:19:03 +00:00
|
|
|
addBooleanOption("Xdoclint:none", true)
|
2022-01-07 01:28:13 +00:00
|
|
|
addStringOption("Xmaxwarns", "1")
|
|
|
|
}
|
2022-01-06 23:36:03 +00:00
|
|
|
}
|
2022-01-07 01:51:54 +00:00
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
testLogging.showStandardStreams = true
|
|
|
|
}
|
2022-01-15 09:23:57 +00:00
|
|
|
|
|
|
|
signing {
|
|
|
|
useGpgCmd()
|
|
|
|
sign(publishing.publications["maven"])
|
|
|
|
}
|