mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-24 22:07:33 +00:00
chore: improve multilicence and add improve theme support
https://forum.plantuml.net/17811/theme-supports-no-calculated-from-path-and-stdlib-from-path
This commit is contained in:
parent
2803fa7e7b
commit
2adee2f574
@ -1 +1,2 @@
|
||||
version = 1.2023.7
|
||||
version = 1.2023.8beta1
|
||||
org.gradle.workers.max = 3
|
182
plantuml-asl/build.gradle.kts
Normal file
182
plantuml-asl/build.gradle.kts
Normal file
@ -0,0 +1,182 @@
|
||||
// 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")
|
||||
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 "__ASL__"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("ASL License")
|
||||
url.set("https://opensource.org/license/apache-2-0/")
|
||||
}
|
||||
}
|
||||
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"])
|
||||
}
|
||||
}
|
182
plantuml-bsd/build.gradle.kts
Normal file
182
plantuml-bsd/build.gradle.kts
Normal file
@ -0,0 +1,182 @@
|
||||
// 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")
|
||||
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 "__BSD__"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("BSD License")
|
||||
url.set("https://opensource.org/license/bsd-2-clause/")
|
||||
}
|
||||
}
|
||||
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"])
|
||||
}
|
||||
}
|
182
plantuml-epl/build.gradle.kts
Normal file
182
plantuml-epl/build.gradle.kts
Normal file
@ -0,0 +1,182 @@
|
||||
// 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")
|
||||
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 "__EPL__"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("EPL License")
|
||||
url.set("https://opensource.org/license/epl-1-0/")
|
||||
}
|
||||
}
|
||||
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"])
|
||||
}
|
||||
}
|
182
plantuml-lgpl/build.gradle.kts
Normal file
182
plantuml-lgpl/build.gradle.kts
Normal file
@ -0,0 +1,182 @@
|
||||
// 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")
|
||||
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 "__LGPL__"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("LGPL License")
|
||||
url.set("https://opensource.org/license/lgpl-2-1/")
|
||||
}
|
||||
}
|
||||
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"])
|
||||
}
|
||||
}
|
@ -91,7 +91,7 @@ val syncSources by tasks.registering(Sync::class) {
|
||||
into(project.layout.buildDirectory.dir("sources/sjpp/java"))
|
||||
}
|
||||
|
||||
val preprocessMitLicenceAntTask by tasks.registering() {
|
||||
val preprocessLicenceAntTask by tasks.registering() {
|
||||
dependsOn(syncSources)
|
||||
inputs.dir(project.layout.buildDirectory.dir("sources/sjpp/java"))
|
||||
outputs.dir(project.layout.buildDirectory.dir("generated/sjpp"))
|
||||
@ -112,15 +112,15 @@ val preprocessMitLicenceAntTask by tasks.registering() {
|
||||
}
|
||||
|
||||
tasks.processResources{
|
||||
dependsOn(preprocessMitLicenceAntTask)
|
||||
dependsOn(preprocessLicenceAntTask)
|
||||
}
|
||||
|
||||
tasks.compileJava{
|
||||
dependsOn(preprocessMitLicenceAntTask)
|
||||
dependsOn(preprocessLicenceAntTask)
|
||||
}
|
||||
|
||||
tasks.named("sourcesJar"){
|
||||
dependsOn(preprocessMitLicenceAntTask)
|
||||
dependsOn(preprocessLicenceAntTask)
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,3 +3,7 @@ rootProject.name = "plantuml"
|
||||
val isCiBuild = System.getenv("CI") != null
|
||||
|
||||
include("plantuml-mit")
|
||||
include("plantuml-epl")
|
||||
include("plantuml-bsd")
|
||||
include("plantuml-asl")
|
||||
include("plantuml-lgpl")
|
@ -98,7 +98,7 @@ import ext.plantuml.com.ctreber.aclib.sort.QuickSort;
|
||||
*/
|
||||
public class ACearth {
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
public static final String VERSION = "1.1";
|
||||
public static final String BUILD = "22.11.2002 004";
|
||||
|
||||
|
@ -10,7 +10,7 @@ package ext.plantuml.com.ctreber.aclib.gui;
|
||||
public class MOBoolean extends MonitoredObject
|
||||
{
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
private boolean fBoolean;
|
||||
|
||||
public MOBoolean()
|
||||
|
@ -13,7 +13,7 @@ abstract public class CTSort
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
public void sort(Object[] items)
|
||||
{
|
||||
sort(items, new DefaultComparator());
|
||||
|
@ -26,7 +26,7 @@ import java.util.Hashtable;
|
||||
public final class BarcodeFormat {
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
// No, we can't use an enum here. J2ME doesn't support it.
|
||||
|
||||
|
@ -50,7 +50,7 @@ import jcckit.util.Factory;
|
||||
public class GraphicsPlotCanvas extends PlotCanvas {
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
/** Key of a configuration parameter. */
|
||||
public static final String BACKGROUND_KEY = "background";
|
||||
public static final String FOREGROUND_KEY = "foreground";
|
||||
|
@ -208,12 +208,10 @@ public class PSystemBuilder {
|
||||
// factories.add(new PSystemSudokuFactory());
|
||||
// ::done
|
||||
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
factories.add(new PSystemDitaaFactory());
|
||||
if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) {
|
||||
factories.add(new PSystemJcckitFactory());
|
||||
factories.add(new PSystemSudokuFactory());
|
||||
}
|
||||
// ::done
|
||||
|
||||
// ::comment when __CORE__
|
||||
@ -232,10 +230,8 @@ public class PSystemBuilder {
|
||||
// ::done
|
||||
|
||||
factories.add(new PSystemCharlieFactory());
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) {
|
||||
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
factories.add(new PSystemXearthFactory());
|
||||
}
|
||||
// ::done
|
||||
|
||||
factories.add(new GanttDiagramFactory());
|
||||
|
@ -59,7 +59,7 @@ import net.sourceforge.plantuml.core.UmlSource;
|
||||
|
||||
public class PSystemXearth extends AbstractPSystem {
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
final private int width;
|
||||
final private int height;
|
||||
|
@ -50,7 +50,7 @@ import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class FlashCodeUtilsZxing implements FlashCodeUtils {
|
||||
// ::remove file when __MIT__
|
||||
// ::remove file when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
private static final Lock lock = new ReentrantLock();
|
||||
|
||||
|
@ -103,7 +103,7 @@ import java.util.Map;
|
||||
public class Jasic {
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
// Tokenizing (lexing) -----------------------------------------------------
|
||||
|
||||
|
@ -54,7 +54,7 @@ import net.sourceforge.plantuml.security.SImageIO;
|
||||
|
||||
public class PSystemJcckit extends AbstractPSystem {
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
private final PropertiesBasedConfigData prop;
|
||||
private final int width;
|
||||
|
@ -41,7 +41,7 @@ import java.util.Map;
|
||||
class LogoScanner {
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
final private Map<String, Integer> keywordTable = new HashMap<String, Integer>();
|
||||
private char sourceString[];
|
||||
private int sourceLength;
|
||||
|
@ -68,7 +68,7 @@ import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty;
|
||||
import net.sourceforge.plantuml.png.PngIO;
|
||||
|
||||
public class GraphicsSudoku {
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
|
||||
private final ISudoku sudoku;
|
||||
private final UFont numberFont = UFont.sansSerif(20).bold();
|
||||
|
@ -79,6 +79,17 @@ public class ThemeUtils {
|
||||
// ::done
|
||||
|
||||
// ::comment when __CORE__
|
||||
public static ReadLine getReaderTheme(String realName, String from) {
|
||||
final String description = realName + " from " + from;
|
||||
from = from.substring(1, from.length() - 1);
|
||||
final String res = from + "/" + THEME_FILE_PREFIX + realName + THEME_FILE_SUFFIX;
|
||||
final InputStream is = Stdlib.getResourceAsStream(res);
|
||||
if (is == null)
|
||||
return null;
|
||||
|
||||
return ReadLineReader.create(new InputStreamReader(is), description);
|
||||
}
|
||||
|
||||
public static ReadLine getReaderTheme(String filename) {
|
||||
Log.info("Loading theme " + filename);
|
||||
final String res = "/" + THEME_PATH + "/" + THEME_FILE_PREFIX + filename + THEME_FILE_SUFFIX;
|
||||
|
@ -76,7 +76,7 @@ public class EaterTheme extends Eater {
|
||||
final int x = this.name.toLowerCase().indexOf(" from ");
|
||||
if (x != -1) {
|
||||
this.from = this.name.substring(x + " from ".length());
|
||||
this.name = this.name.substring(0, x);
|
||||
this.name = this.name.substring(0, x).trim();
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@ -102,6 +102,11 @@ public class EaterTheme extends Eater {
|
||||
}
|
||||
throw EaterException.located("Cannot load " + realName);
|
||||
|
||||
} else if (from.startsWith("<") && from.endsWith(">")) {
|
||||
final ReadLine reader = ThemeUtils.getReaderTheme(realName, from);
|
||||
if (reader == null)
|
||||
throw EaterException.located("No such theme " + realName + " in " + from);
|
||||
return reader;
|
||||
} else if (from.startsWith("http://") || from.startsWith("https://")) {
|
||||
final SURL url = SURL.create(ThemeUtils.getFullPath(from, realName));
|
||||
if (url == null)
|
||||
|
@ -2,56 +2,25 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2024, Arnaud Roques
|
||||
* Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
|
||||
* www.source-code.biz, www.inventec.ch/chdh
|
||||
*
|
||||
* Project Info: https://plantuml.com
|
||||
* This module is multi-licensed and may be used under the terms
|
||||
* of any of the following licenses:
|
||||
*
|
||||
* 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/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
* EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal
|
||||
* LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html
|
||||
* GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html
|
||||
* AGPL, GNU Affero General Public License V3 or later, http://www.gnu.org/licenses/agpl.html
|
||||
* AL, Apache License, V2.0 or later, http://www.apache.org/licenses
|
||||
* BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php
|
||||
* MIT, MIT License, http://www.opensource.org/licenses/MIT
|
||||
*
|
||||
* Please contact the author if you need another license.
|
||||
* This module is provided "as is", without warranties of any kind.
|
||||
*
|
||||
* Project home page: www.source-code.biz/base64coder/java
|
||||
*/
|
||||
// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
|
||||
// www.source-code.biz, www.inventec.ch/chdh
|
||||
//
|
||||
// This module is multi-licensed and may be used under the terms
|
||||
// of any of the following licenses:
|
||||
//
|
||||
// EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal
|
||||
// LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html
|
||||
// GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html
|
||||
// AGPL, GNU Affero General Public License V3 or later, http://www.gnu.org/licenses/agpl.html
|
||||
// AL, Apache License, V2.0 or later, http://www.apache.org/licenses
|
||||
// BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php
|
||||
// MIT, MIT License, http://www.opensource.org/licenses/MIT
|
||||
//
|
||||
// Please contact the author if you need another license.
|
||||
// This module is provided "as is", without warranties of any kind.
|
||||
//
|
||||
// Project home page: www.source-code.biz/base64coder/java
|
||||
|
||||
package net.sourceforge.plantuml.utils;
|
||||
|
||||
/**
|
||||
@ -64,11 +33,17 @@ package net.sourceforge.plantuml.utils;
|
||||
* Project home page: <a href=
|
||||
* "http://www.source-code.biz/base64coder/java/">www.source-code.biz/base64coder/java</a><br>
|
||||
* Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland<br>
|
||||
* Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT.
|
||||
*
|
||||
* @author Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland,
|
||||
* www.source-code.biz
|
||||
*/
|
||||
//::comment when __MIT__
|
||||
//Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT.
|
||||
//::done
|
||||
//::uncomment when __MIT__
|
||||
// // Used license: MIT.
|
||||
//::done
|
||||
|
||||
public class Base64Coder {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
|
@ -36,30 +36,46 @@ package net.sourceforge.plantuml.version;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.OptionFlags;
|
||||
import net.sourceforge.plantuml.windowsdot.WindowsDotArchive;
|
||||
|
||||
public enum License {
|
||||
public class License {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
return "GPL";
|
||||
// ::done
|
||||
// ::uncomment when __CORE__ or __MIT__
|
||||
// MIT;
|
||||
// return "MIT";
|
||||
// ::done
|
||||
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
GPL, GPLV2, LGPL, APACHE, EPL, MIT, BSD;
|
||||
// ::uncomment when __EPL__
|
||||
// return "EPL";
|
||||
// ::done
|
||||
// ::uncomment when __BSD__
|
||||
// return "BSD";
|
||||
// ::done
|
||||
// ::uncomment when __ASL__
|
||||
// return "APACHE";
|
||||
// ::done
|
||||
// ::uncomment when __LGPL__
|
||||
// return "LGPL";
|
||||
// ::done
|
||||
}
|
||||
|
||||
public static License getCurrent() {
|
||||
// ::uncomment when __CORE__ or __MIT__
|
||||
// return MIT;
|
||||
// ::done
|
||||
return new License();
|
||||
}
|
||||
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
return GPL;
|
||||
// ::done
|
||||
public List<String> getTextFull() {
|
||||
final List<String> text = new ArrayList<>();
|
||||
final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick();
|
||||
header1(text, licenseInfo);
|
||||
header2(text, licenseInfo, false);
|
||||
end3(licenseInfo, text);
|
||||
return text;
|
||||
}
|
||||
|
||||
public List<String> getText1(LicenseInfo licenseInfo) {
|
||||
@ -125,49 +141,42 @@ public enum License {
|
||||
}
|
||||
}
|
||||
|
||||
private void addMit(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// ::uncomment when __CORE__
|
||||
// text.add("Powered by CheerpJ, a Leaning Technologies Java tool.");
|
||||
// text.add("This library is running using CheerpJ for PlantUML License provided by Leaning Technologies Limited.");
|
||||
// text.add(" ");
|
||||
// text.add(" ");
|
||||
// ::done
|
||||
private void end3(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the MIT License.");
|
||||
text.add("under the terms of the GNU General Public License as published by");
|
||||
text.add("the Free Software Foundation, either version 3 of the License, or");
|
||||
text.add("(at your option) any later version.");
|
||||
text.add(" ");
|
||||
text.add("See http://opensource.org/licenses/MIT");
|
||||
text.add("PlantUML distributed in the hope that it will be useful, but");
|
||||
text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public");
|
||||
text.add("License for more details.");
|
||||
text.add(" ");
|
||||
text.add("Permission is hereby granted, free of charge, to any person obtaining");
|
||||
text.add("a copy of this software and associated documentation files (the \"Software\"),");
|
||||
text.add("to deal in the Software without restriction, including without limitation");
|
||||
text.add("the rights to use, copy, modify, merge, publish, distribute, sublicense,");
|
||||
text.add("and/or sell copies of the Software, and to permit persons to whom the");
|
||||
text.add("Software is furnished to do so, subject to the following conditions:");
|
||||
text.add(" ");
|
||||
text.add("The above copyright notice and this permission notice shall be included");
|
||||
text.add("in all copies or substantial portions of the Software.");
|
||||
text.add(" ");
|
||||
text.add("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS");
|
||||
text.add("OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
|
||||
text.add("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
|
||||
text.add("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,");
|
||||
text.add("WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR");
|
||||
text.add("IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the MIT License.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the MIT License.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the MIT), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
text.add("You should have received a copy of the GNU General Public License");
|
||||
text.add("along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
// ::done
|
||||
|
||||
private void addSupplementary(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// ::uncomment when __CORE__
|
||||
// addCore(licenseInfo, text);
|
||||
// ::done
|
||||
// ::uncomment when __MIT__
|
||||
// addMit(licenseInfo, text);
|
||||
// ::done
|
||||
// ::uncomment when __EPL__
|
||||
// addEpl(licenseInfo, text);
|
||||
// ::done
|
||||
// ::uncomment when __BSD__
|
||||
// addBsd(licenseInfo, text);
|
||||
// ::done
|
||||
// ::uncomment when __ASL__
|
||||
// addApache(licenseInfo, text);
|
||||
// ::done
|
||||
// ::uncomment when __LGPL__
|
||||
// addLgpl(licenseInfo, text);
|
||||
// ::done
|
||||
|
||||
text.add(" ");
|
||||
if (licenseInfo.isValid() == false) {
|
||||
text.add("PlantUML can occasionally display sponsored or advertising messages. Those");
|
||||
text.add("messages are usually generated on welcome or error images and never on");
|
||||
@ -179,29 +188,15 @@ public enum License {
|
||||
text.add("Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML");
|
||||
text.add("are owned by the author of their corresponding sources code (that is, their");
|
||||
text.add("textual description in PlantUML language). Those images are not covered by");
|
||||
}
|
||||
|
||||
private void end3(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
if (this == License.GPL)
|
||||
addGpl(licenseInfo, text);
|
||||
else if (this == License.GPLV2)
|
||||
addGplV2(licenseInfo, text);
|
||||
else if (this == License.MIT)
|
||||
// ::done
|
||||
addMit(licenseInfo, text);
|
||||
// ::comment when __CORE__ or __MIT__
|
||||
else if (this == License.EPL)
|
||||
addEpl(licenseInfo, text);
|
||||
else if (this == License.BSD)
|
||||
addBsd(licenseInfo, text);
|
||||
else if (this == License.APACHE)
|
||||
addApache(licenseInfo, text);
|
||||
else if (this == License.LGPL)
|
||||
addLgpl(licenseInfo, text);
|
||||
else
|
||||
throw new IllegalStateException();
|
||||
// ::done
|
||||
text.add("this " + this + " license.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the " + this + " license.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by any license, then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
|
||||
// ::comment when __CORE__
|
||||
if (OptionFlags.getInstance().isEnableStats()) {
|
||||
@ -233,184 +228,151 @@ public enum License {
|
||||
text.add(" ");
|
||||
}
|
||||
|
||||
// ::comment when __CORE__
|
||||
private void addEpl(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the Eclipse Public License.");
|
||||
text.add(" ");
|
||||
text.add("THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC");
|
||||
text.add("LICENSE (\"AGREEMENT\"). [Eclipse Public License - v 1.0]");
|
||||
text.add(" ");
|
||||
text.add("ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES");
|
||||
text.add("RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.");
|
||||
text.add(" ");
|
||||
text.add("You may obtain a copy of the License at");
|
||||
text.add(" ");
|
||||
text.add("http://www.eclipse.org/legal/epl-v10.html");
|
||||
text.add(" ");
|
||||
text.add("Unless required by applicable law or agreed to in writing, software");
|
||||
text.add("distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
text.add("See the License for the specific language governing permissions and");
|
||||
text.add("limitations under the License.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the Eclipse Public License.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the Eclipse Public License.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the EPL), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __CORE__
|
||||
// private void addCore(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("Powered by CheerpJ, a Leaning Technologies Java tool.");
|
||||
// text.add("This library is running using CheerpJ for PlantUML License provided by Leaning Technologies Limited.");
|
||||
// text.add(" ");
|
||||
// text.add(" ");
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the MIT License.");
|
||||
// text.add(" ");
|
||||
// text.add("See http://opensource.org/licenses/MIT");
|
||||
// text.add(" ");
|
||||
// text.add("Permission is hereby granted, free of charge, to any person obtaining");
|
||||
// text.add("a copy of this software and associated documentation files (the \"Software\"),");
|
||||
// text.add("to deal in the Software without restriction, including without limitation");
|
||||
// text.add("the rights to use, copy, modify, merge, publish, distribute, sublicense,");
|
||||
// text.add("and/or sell copies of the Software, and to permit persons to whom the");
|
||||
// text.add("Software is furnished to do so, subject to the following conditions:");
|
||||
// text.add(" ");
|
||||
// text.add("The above copyright notice and this permission notice shall be included");
|
||||
// text.add("in all copies or substantial portions of the Software.");
|
||||
// text.add(" ");
|
||||
// text.add("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS");
|
||||
// text.add("OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
|
||||
// text.add("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
|
||||
// text.add("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,");
|
||||
// text.add("WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR");
|
||||
// text.add("IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
private void addBsd(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the Revised BSD License.");
|
||||
text.add(" ");
|
||||
text.add("All rights reserved.");
|
||||
text.add("Redistribution and use in source and binary forms, with or without");
|
||||
text.add("modification, are permitted provided that the following conditions are met:");
|
||||
text.add(" ");
|
||||
text.add("* Redistributions of source code must retain the above copyright");
|
||||
text.add(" notice, this list of conditions and the following disclaimer.");
|
||||
text.add("* Redistributions in binary form must reproduce the above copyright");
|
||||
text.add(" notice, this list of conditions and the following disclaimer in the");
|
||||
text.add(" documentation and/or other materials provided with the distribution.");
|
||||
text.add("* Neither the name of the University of California, Berkeley nor the");
|
||||
text.add(" names of its contributors may be used to endorse or promote products");
|
||||
text.add(" derived from this software without specific prior written permission.");
|
||||
text.add(" ");
|
||||
text.add("THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY");
|
||||
text.add("EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED");
|
||||
text.add("WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE");
|
||||
text.add("DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY");
|
||||
text.add("DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES");
|
||||
text.add("(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;");
|
||||
text.add("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND");
|
||||
text.add("ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT");
|
||||
text.add("(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS");
|
||||
text.add("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the Eclipse Public License.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the Eclipse Public License.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the BSD), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __MIT__
|
||||
// private void addMit(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the MIT License.");
|
||||
// text.add(" ");
|
||||
// text.add("See http://opensource.org/licenses/MIT");
|
||||
// text.add(" ");
|
||||
// text.add("Permission is hereby granted, free of charge, to any person obtaining");
|
||||
// text.add("a copy of this software and associated documentation files (the \"Software\"),");
|
||||
// text.add("to deal in the Software without restriction, including without limitation");
|
||||
// text.add("the rights to use, copy, modify, merge, publish, distribute, sublicense,");
|
||||
// text.add("and/or sell copies of the Software, and to permit persons to whom the");
|
||||
// text.add("Software is furnished to do so, subject to the following conditions:");
|
||||
// text.add(" ");
|
||||
// text.add("The above copyright notice and this permission notice shall be included");
|
||||
// text.add("in all copies or substantial portions of the Software.");
|
||||
// text.add(" ");
|
||||
// text.add("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS");
|
||||
// text.add("OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
|
||||
// text.add("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
|
||||
// text.add("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,");
|
||||
// text.add("WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR");
|
||||
// text.add("IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
private void addApache(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the Apache Software License.");
|
||||
text.add(" ");
|
||||
text.add("Licensed under the Apache License, Version 2.0 (the \"License\");");
|
||||
text.add("you may not use this file except in compliance with the License.");
|
||||
text.add("You may obtain a copy of the License at");
|
||||
text.add(" ");
|
||||
text.add("http://www.apache.org/licenses/LICENSE-2.0");
|
||||
text.add(" ");
|
||||
text.add("Unless required by applicable law or agreed to in writing, software");
|
||||
text.add("distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
text.add("See the License for the specific language governing permissions and");
|
||||
text.add("limitations under the License.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the Apache license.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the Apache license.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the Apache), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __EPL__
|
||||
// private void addEpl(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the Eclipse Public License.");
|
||||
// text.add(" ");
|
||||
// text.add("THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC");
|
||||
// text.add("LICENSE (\"AGREEMENT\"). [Eclipse Public License - v 1.0]");
|
||||
// text.add(" ");
|
||||
// text.add("ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES");
|
||||
// text.add("RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.");
|
||||
// text.add(" ");
|
||||
// text.add("You may obtain a copy of the License at");
|
||||
// text.add(" ");
|
||||
// text.add("http://www.eclipse.org/legal/epl-v10.html");
|
||||
// text.add(" ");
|
||||
// text.add("Unless required by applicable law or agreed to in writing, software");
|
||||
// text.add("distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
// text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
// text.add("See the License for the specific language governing permissions and");
|
||||
// text.add("limitations under the License.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
private void addGpl(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the GNU General Public License as published by");
|
||||
text.add("the Free Software Foundation, either version 3 of the License, or");
|
||||
text.add("(at your option) any later version.");
|
||||
text.add(" ");
|
||||
text.add("PlantUML distributed in the hope that it will be useful, but");
|
||||
text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public");
|
||||
text.add("License for more details.");
|
||||
text.add(" ");
|
||||
text.add("You should have received a copy of the GNU General Public License");
|
||||
text.add("along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the GPL license.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the GPL license.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the GPL), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __BSD__
|
||||
// private void addBsd(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the Revised BSD License.");
|
||||
// text.add(" ");
|
||||
// text.add("All rights reserved.");
|
||||
// text.add("Redistribution and use in source and binary forms, with or without");
|
||||
// text.add("modification, are permitted provided that the following conditions are met:");
|
||||
// text.add(" ");
|
||||
// text.add("* Redistributions of source code must retain the above copyright");
|
||||
// text.add(" notice, this list of conditions and the following disclaimer.");
|
||||
// text.add("* Redistributions in binary form must reproduce the above copyright");
|
||||
// text.add(" notice, this list of conditions and the following disclaimer in the");
|
||||
// text.add(" documentation and/or other materials provided with the distribution.");
|
||||
// text.add("* Neither the name of the University of California, Berkeley nor the");
|
||||
// text.add(" names of its contributors may be used to endorse or promote products");
|
||||
// text.add(" derived from this software without specific prior written permission.");
|
||||
// text.add(" ");
|
||||
// text.add("THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY");
|
||||
// text.add("EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED");
|
||||
// text.add("WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE");
|
||||
// text.add("DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY");
|
||||
// text.add("DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES");
|
||||
// text.add("(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;");
|
||||
// text.add("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND");
|
||||
// text.add("ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT");
|
||||
// text.add("(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS");
|
||||
// text.add("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
private void addGplV2(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the GNU General Public License as published by");
|
||||
text.add("the Free Software Foundation, either version 2 of the License, or");
|
||||
text.add("(at your option) any later version.");
|
||||
text.add(" ");
|
||||
text.add("PlantUML distributed in the hope that it will be useful, but");
|
||||
text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public");
|
||||
text.add("License for more details.");
|
||||
text.add(" ");
|
||||
text.add("You should have received a copy of the GNU General Public License");
|
||||
text.add("along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the GPL license.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the GPL license.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the GPL), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __ASL__
|
||||
// private void addApache(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the Apache Software License.");
|
||||
// text.add(" ");
|
||||
// text.add("Licensed under the Apache License, Version 2.0 (the \"License\");");
|
||||
// text.add("you may not use this file except in compliance with the License.");
|
||||
// text.add("You may obtain a copy of the License at");
|
||||
// text.add(" ");
|
||||
// text.add("http://www.apache.org/licenses/LICENSE-2.0");
|
||||
// text.add(" ");
|
||||
// text.add("Unless required by applicable law or agreed to in writing, software");
|
||||
// text.add("distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
// text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
// text.add("See the License for the specific language governing permissions and");
|
||||
// text.add("limitations under the License.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
private void addLgpl(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
text.add("under the terms of the GNU Lesser General Public License as published by");
|
||||
text.add("the Free Software Foundation, either version 3 of the License, or");
|
||||
text.add("(at your option) any later version.");
|
||||
text.add(" ");
|
||||
text.add("PlantUML distributed in the hope that it will be useful, but");
|
||||
text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public");
|
||||
text.add("License for more details.");
|
||||
text.add(" ");
|
||||
text.add("You should have received a copy of the GNU Lesser General Public License");
|
||||
text.add("along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
text.add(" ");
|
||||
addSupplementary(licenseInfo, text);
|
||||
text.add("the LGPL license.");
|
||||
text.add(" ");
|
||||
text.add("The generated images can then be used without any reference to the LGPL license.");
|
||||
text.add("It is not even necessary to stipulate that they have been generated with PlantUML,");
|
||||
text.add("although this will be appreciated by the PlantUML team.");
|
||||
text.add(" ");
|
||||
text.add("There is an exception : if the textual description in PlantUML language is also covered");
|
||||
text.add("by a license (like the LGPL), then the generated images are logically covered");
|
||||
text.add("by the very same license.");
|
||||
}
|
||||
// ::uncomment when __LGPL__
|
||||
// private void addLgpl(final LicenseInfo licenseInfo, final List<String> text) {
|
||||
// text.add("PlantUML is free software; you can redistribute it and/or modify it");
|
||||
// text.add("under the terms of the GNU Lesser General Public License as published by");
|
||||
// text.add("the Free Software Foundation, either version 3 of the License, or");
|
||||
// text.add("(at your option) any later version.");
|
||||
// text.add(" ");
|
||||
// text.add("PlantUML distributed in the hope that it will be useful, but");
|
||||
// text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
// text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public");
|
||||
// text.add("License for more details.");
|
||||
// text.add(" ");
|
||||
// text.add("You should have received a copy of the GNU Lesser General Public License");
|
||||
// text.add("along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
// }
|
||||
// ::done
|
||||
|
||||
public static void addLicenseInfo(final List<String> text, LicenseInfo licenseInfo) {
|
||||
if (licenseInfo.getLicenseType() == LicenseType.NAMED) {
|
||||
@ -430,145 +392,4 @@ public enum License {
|
||||
}
|
||||
}
|
||||
|
||||
// ::comment when __MIT__
|
||||
public List<String> getJavaHeader(List<String> contributors) {
|
||||
final List<String> h = new ArrayList<>();
|
||||
h.add("/* ========================================================================");
|
||||
h.add(" * PlantUML : a free UML diagram generator");
|
||||
h.add(" * ========================================================================");
|
||||
h.add(" *");
|
||||
h.add(" * (C) Copyright 2009-2024, Arnaud Roques");
|
||||
h.add(" *");
|
||||
h.add(" * Project Info: https://plantuml.com");
|
||||
h.add(" * ");
|
||||
h.add(" * If you like this project or if you find it useful, you can support us at:");
|
||||
h.add(" * ");
|
||||
h.add(" * https://plantuml.com/patreon (only 1$ per month!)");
|
||||
h.add(" * https://plantuml.com/paypal");
|
||||
h.add(" * ");
|
||||
h.add(" * This file is part of PlantUML.");
|
||||
h.add(" *");
|
||||
if (this == License.LGPL) {
|
||||
h.add(" * PlantUML is free software; you can redistribute it and/or modify it");
|
||||
h.add(" * under the terms of the GNU Lesser General Public License as published by");
|
||||
h.add(" * the Free Software Foundation, either version 3 of the License, or");
|
||||
h.add(" * (at your option) any later version.");
|
||||
h.add(" *");
|
||||
h.add(" * PlantUML distributed in the hope that it will be useful, but");
|
||||
h.add(" * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
h.add(" * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public");
|
||||
h.add(" * License for more details.");
|
||||
h.add(" *");
|
||||
h.add(" * You should have received a copy of the GNU General Public License");
|
||||
h.add(" * along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
h.add(" *");
|
||||
} else if (this == License.GPLV2) {
|
||||
h.add(" * PlantUML is free software; you can redistribute it and/or modify it");
|
||||
h.add(" * under the terms of the GNU General Public License as published by");
|
||||
h.add(" * the Free Software Foundation, either version 2 of the License, or");
|
||||
h.add(" * (at your option) any later version.");
|
||||
h.add(" *");
|
||||
h.add(" * PlantUML distributed in the hope that it will be useful, but");
|
||||
h.add(" * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY");
|
||||
h.add(" * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public");
|
||||
h.add(" * License for more details.");
|
||||
h.add(" *");
|
||||
h.add(" * You should have received a copy of the GNU General Public License");
|
||||
h.add(" * along with this library. If not, see <https://www.gnu.org/licenses/>.");
|
||||
h.add(" *");
|
||||
} else if (this == License.APACHE) {
|
||||
h.add(" * Licensed under the Apache License, Version 2.0 (the \"License\");");
|
||||
h.add(" * you may not use this file except in compliance with the License.");
|
||||
h.add(" * You may obtain a copy of the License at");
|
||||
h.add(" * ");
|
||||
h.add(" * http://www.apache.org/licenses/LICENSE-2.0");
|
||||
h.add(" * ");
|
||||
h.add(" * Unless required by applicable law or agreed to in writing, software");
|
||||
h.add(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
h.add(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
h.add(" * See the License for the specific language governing permissions and");
|
||||
h.add(" * limitations under the License.");
|
||||
h.add(" *");
|
||||
} else if (this == License.EPL) {
|
||||
h.add(" * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC");
|
||||
h.add(" * LICENSE (\"AGREEMENT\"). [Eclipse Public License - v 1.0]");
|
||||
h.add(" * ");
|
||||
h.add(" * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES");
|
||||
h.add(" * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.");
|
||||
h.add(" * ");
|
||||
h.add(" * You may obtain a copy of the License at");
|
||||
h.add(" * ");
|
||||
h.add(" * http://www.eclipse.org/legal/epl-v10.html");
|
||||
h.add(" * ");
|
||||
h.add(" * Unless required by applicable law or agreed to in writing, software");
|
||||
h.add(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
|
||||
h.add(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
|
||||
h.add(" * See the License for the specific language governing permissions and");
|
||||
h.add(" * limitations under the License.");
|
||||
h.add(" * ");
|
||||
} else if (this == License.BSD) {
|
||||
h.add(" * Licensed under the Revised BSD License (the Revised Berkeley Software Distribution)");
|
||||
h.add(" * ");
|
||||
h.add(" * Redistribution and use in source and binary forms, with or without");
|
||||
h.add(" * modification, are permitted provided that the following conditions are met:");
|
||||
h.add(" * ");
|
||||
h.add(" * * Redistributions of source code must retain the above copyright");
|
||||
h.add(" * notice, this list of conditions and the following disclaimer.");
|
||||
h.add(" * * Redistributions in binary form must reproduce the above copyright");
|
||||
h.add(" * notice, this list of conditions and the following disclaimer in the");
|
||||
h.add(" * documentation and/or other materials provided with the distribution.");
|
||||
h.add(" * * Neither the name of the University of California, Berkeley nor the");
|
||||
h.add(" * names of its contributors may be used to endorse or promote products");
|
||||
h.add(" * derived from this software without specific prior written permission.");
|
||||
h.add(" * ");
|
||||
h.add(" * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY");
|
||||
h.add(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED");
|
||||
h.add(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE");
|
||||
h.add(" * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY");
|
||||
h.add(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES");
|
||||
h.add(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;");
|
||||
h.add(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND");
|
||||
h.add(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT");
|
||||
h.add(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS");
|
||||
h.add(" * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
|
||||
h.add(" * ");
|
||||
} else if (this == License.MIT) {
|
||||
h.add(" * Licensed under The MIT License (Massachusetts Institute of Technology License)");
|
||||
h.add(" * ");
|
||||
h.add(" * See http://opensource.org/licenses/MIT");
|
||||
h.add(" * ");
|
||||
h.add(" * Permission is hereby granted, free of charge, to any person obtaining");
|
||||
h.add(" * a copy of this software and associated documentation files (the \"Software\"),");
|
||||
h.add(" * to deal in the Software without restriction, including without limitation");
|
||||
h.add(" * the rights to use, copy, modify, merge, publish, distribute, sublicense,");
|
||||
h.add(" * and/or sell copies of the Software, and to permit persons to whom the");
|
||||
h.add(" * Software is furnished to do so, subject to the following conditions:");
|
||||
h.add(" * ");
|
||||
h.add(" * The above copyright notice and this permission notice shall be included");
|
||||
h.add(" * in all copies or substantial portions of the Software.");
|
||||
h.add(" * ");
|
||||
h.add(" * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS");
|
||||
h.add(" * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
|
||||
h.add(" * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
|
||||
h.add(" * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,");
|
||||
h.add(" * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR");
|
||||
h.add(" * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
|
||||
h.add(" * ");
|
||||
}
|
||||
h.add(" *");
|
||||
h.add(" * Original Author: Arnaud Roques");
|
||||
h.addAll(contributors);
|
||||
h.add(" */");
|
||||
return Collections.unmodifiableList(h);
|
||||
}
|
||||
// ::done
|
||||
|
||||
public List<String> getTextFull() {
|
||||
final List<String> text = new ArrayList<>();
|
||||
final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick();
|
||||
header1(text, licenseInfo);
|
||||
header2(text, licenseInfo, false);
|
||||
end3(licenseInfo, text);
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 0;
|
||||
final int beta = 1;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import javax.imageio.stream.ImageInputStream;
|
||||
public class BoolDecoder {
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __MIT__
|
||||
// ::remove folder when __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
|
||||
int bit_count; /* # of bits shifted out of value, at most 7 */
|
||||
ImageInputStream data;
|
||||
private long offset; /* pointer to next compressed data byte */
|
||||
|
Loading…
Reference in New Issue
Block a user