mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-21 20:45:10 +00:00
chore: restore GPL v2 version
This commit is contained in:
parent
5d38bb6ef4
commit
8adfb59f5b
190
plantuml-gplv2/build.gradle.kts
Normal file
190
plantuml-gplv2/build.gradle.kts
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
// permits to start the build setting the javac release parameter, no parameter means build for java8:
|
||||||
|
// gradle clean build -x javaDoc -PjavacRelease=8
|
||||||
|
// gradle clean build -x javaDoc -PjavacRelease=17
|
||||||
|
// also supported is to build first, with java17, then switch the java version, and run the test with java8:
|
||||||
|
// gradle clean build -x javaDoc -x test
|
||||||
|
// gradle test
|
||||||
|
val javacRelease = (project.findProperty("javacRelease") ?: "8") as String
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
java
|
||||||
|
`maven-publish`
|
||||||
|
signing
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "net.sourceforge.plantuml"
|
||||||
|
description = "PlantUML"
|
||||||
|
|
||||||
|
java {
|
||||||
|
withSourcesJar()
|
||||||
|
withJavadocJar()
|
||||||
|
registerFeature("pdf") {
|
||||||
|
usingSourceSet(sourceSets["main"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly("org.apache.ant:ant:1.10.13")
|
||||||
|
testImplementation("org.assertj:assertj-core:3.24.2")
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
|
||||||
|
testImplementation("org.scilab.forge:jlatexmath:1.0.7")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
java {
|
||||||
|
srcDirs("build/generated/sjpp")
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
srcDirs("build/generated/sjpp", "build/copiedResources")
|
||||||
|
include("**/graphviz.dat")
|
||||||
|
include("**/*.png")
|
||||||
|
include("**/*.svg")
|
||||||
|
include("**/*.txt")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.compileJava {
|
||||||
|
if (JavaVersion.current().isJava8) {
|
||||||
|
java.targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
} else {
|
||||||
|
options.release.set(Integer.parseInt(javacRelease))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Jar>().configureEach {
|
||||||
|
manifest {
|
||||||
|
attributes["Main-Class"] = "net.sourceforge.plantuml.Run"
|
||||||
|
attributes["Implementation-Version"] = archiveVersion
|
||||||
|
attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version")
|
||||||
|
from("../manifest.txt")
|
||||||
|
}
|
||||||
|
from("../skin") { into("skin") }
|
||||||
|
from("../stdlib") { into("stdlib") }
|
||||||
|
from("../svg") { into("svg") }
|
||||||
|
from("../themes") { into("themes") }
|
||||||
|
// source sets for java and resources are on "src", only put once into the jar
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Javadoc>().configureEach {
|
||||||
|
options {
|
||||||
|
this as StandardJavadocDocletOptions
|
||||||
|
addBooleanOption("Xdoclint:none", true)
|
||||||
|
addStringOption("Xmaxwarns", "1")
|
||||||
|
encoding = "UTF-8"
|
||||||
|
isUse = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val syncSources by tasks.registering(Sync::class) {
|
||||||
|
from(rootProject.layout.projectDirectory.dir("src"))
|
||||||
|
into(project.layout.buildDirectory.dir("sources/sjpp/java"))
|
||||||
|
}
|
||||||
|
|
||||||
|
val preprocessLicenceAntTask by tasks.registering() {
|
||||||
|
dependsOn(syncSources)
|
||||||
|
inputs.dir(project.layout.buildDirectory.dir("sources/sjpp/java"))
|
||||||
|
outputs.dir(project.layout.buildDirectory.dir("generated/sjpp"))
|
||||||
|
doLast {
|
||||||
|
ant.withGroovyBuilder {
|
||||||
|
"taskdef"(
|
||||||
|
"name" to "sjpp",
|
||||||
|
"classname" to "sjpp.SjppAntTask",
|
||||||
|
"classpath" to rootProject.layout.projectDirectory.files("sjpp.jar").asPath
|
||||||
|
)
|
||||||
|
"sjpp"(
|
||||||
|
"src" to project.layout.buildDirectory.dir("sources/sjpp/java").get().asFile.absolutePath,
|
||||||
|
"dest" to project.layout.buildDirectory.dir("generated/sjpp").get().asFile.absolutePath,
|
||||||
|
"define" to "__GPLV2__",
|
||||||
|
"header" to project.layout.buildDirectory.file("../gplv2-license.txt").get().asFile.absolutePath
|
||||||
|
)
|
||||||
|
}
|
||||||
|
project.copy {
|
||||||
|
includeEmptyDirs = false
|
||||||
|
from(project.layout.buildDirectory.dir("sources/sjpp/java")) {
|
||||||
|
include("**/graphviz.dat")
|
||||||
|
}
|
||||||
|
into(project.layout.buildDirectory.dir("copiedResources"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.processResources{
|
||||||
|
dependsOn(preprocessLicenceAntTask)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.compileJava{
|
||||||
|
dependsOn(preprocessLicenceAntTask)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("sourcesJar"){
|
||||||
|
dependsOn(preprocessLicenceAntTask)
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications.create<MavenPublication>("maven") {
|
||||||
|
from(components["java"])
|
||||||
|
pom {
|
||||||
|
name.set("PlantUML")
|
||||||
|
description.set("PlantUML is a component that allows to quickly write diagrams from text.")
|
||||||
|
groupId = project.group as String
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version as String
|
||||||
|
url.set("https://plantuml.com/")
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("GPLv2 License")
|
||||||
|
url.set("https://www.gnu.org/licenses/old-licenses/gpl-2.0.html")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id.set("arnaud.roques")
|
||||||
|
name.set("Arnaud Roques")
|
||||||
|
email.set("plantuml@gmail.com")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection.set("scm:git:git://github.com:plantuml/plantuml.git")
|
||||||
|
developerConnection.set("scm:git:ssh://git@github.com:plantuml/plantuml.git")
|
||||||
|
url.set("https://github.com/plantuml/plantuml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "OSSRH"
|
||||||
|
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||||
|
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||||
|
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("OSSRH_USERNAME")
|
||||||
|
password = System.getenv("OSSRH_PASSWORD")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
if (hasProperty("signing.gnupg.keyName") && hasProperty("signing.gnupg.passphrase")) {
|
||||||
|
useGpgCmd()
|
||||||
|
} else if (hasProperty("signingKey") && hasProperty("signingPassword")) {
|
||||||
|
val signingKey: String? by project
|
||||||
|
val signingPassword: String? by project
|
||||||
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||||
|
}
|
||||||
|
if (hasProperty("signing.gnupg.passphrase") || hasProperty("signingPassword")) {
|
||||||
|
sign(publishing.publications["maven"])
|
||||||
|
}
|
||||||
|
}
|
70
plantuml-gplv2/gplv2-license.txt
Normal file
70
plantuml-gplv2/gplv2-license.txt
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/* +=======================================================================
|
||||||
|
* |
|
||||||
|
* | PlantUML : a free UML diagram generator
|
||||||
|
* |
|
||||||
|
* +=======================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2024, Arnaud Roques
|
||||||
|
*
|
||||||
|
* Project Info: https://plantuml.com
|
||||||
|
*
|
||||||
|
* If you like this project or if you find it useful, you can support us at:
|
||||||
|
*
|
||||||
|
* https://plantuml.com/patreon (only 1$ per month!)
|
||||||
|
* https://plantuml.com/liberapay (only 1€ per month!)
|
||||||
|
* https://plantuml.com/paypal
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* PlantUML is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License V2.
|
||||||
|
*
|
||||||
|
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||||
|
* LICENSE ("AGREEMENT"). [GNU General Public License V2]
|
||||||
|
*
|
||||||
|
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||||
|
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
* PlantUML can occasionally display sponsored or advertising messages. Those
|
||||||
|
* messages are usually generated on welcome or error images and never on
|
||||||
|
* functional diagrams.
|
||||||
|
* See https://plantuml.com/professional if you want to remove them
|
||||||
|
*
|
||||||
|
* Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML
|
||||||
|
* are owned by the author of their corresponding sources code (that is, their
|
||||||
|
* textual description in PlantUML language). Those images are not covered by
|
||||||
|
* this GPL v2 license.
|
||||||
|
*
|
||||||
|
* The generated images can then be used without any reference to the GPL v2 license.
|
||||||
|
* It is not even necessary to stipulate that they have been generated with PlantUML,
|
||||||
|
* although this will be appreciated by the PlantUML team.
|
||||||
|
*
|
||||||
|
* There is an exception : if the textual description in PlantUML language is also covered
|
||||||
|
* by any license, then the generated images are logically covered
|
||||||
|
* by the very same license.
|
||||||
|
*
|
||||||
|
* This is the IGY distribution (Install GraphViz by Yourself).
|
||||||
|
* You have to install GraphViz and to setup the GRAPHVIZ_DOT environment variable
|
||||||
|
* (see https://plantuml.com/graphviz-dot )
|
||||||
|
*
|
||||||
|
* Icons provided by OpenIconic : https://useiconic.com/open
|
||||||
|
* Archimate sprites provided by Archi : http://www.archimatetool.com
|
||||||
|
* Stdlib AWS provided by https://github.com/milo-minderbinder/AWS-PlantUML
|
||||||
|
* Stdlib Icons provided https://github.com/tupadr3/plantuml-icon-font-sprites
|
||||||
|
* ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen
|
||||||
|
* ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman
|
||||||
|
* CafeUndZopfli ported by Eugene Klyuchnikov https://github.com/eustas/CafeUndZopfli
|
||||||
|
* Brotli (c) by the Brotli Authors https://github.com/google/brotli
|
||||||
|
* Themes (c) by Brett Schwarz https://github.com/bschwarz/puml-themes
|
||||||
|
* Twemoji (c) by Twitter at https://twemoji.twitter.com/
|
||||||
|
*
|
||||||
|
*/
|
@ -14,4 +14,6 @@ include("plantuml-bsd")
|
|||||||
include("plantuml-epl")
|
include("plantuml-epl")
|
||||||
include("plantuml-lgpl")
|
include("plantuml-lgpl")
|
||||||
include("plantuml-mit")
|
include("plantuml-mit")
|
||||||
|
include("plantuml-gplv2")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user