Skip to content

build: Updated PlantUML dependency to 1.2025.0 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@ name := "gitbucket-plantuml-plugin"

organization := "com.yotaichino"

version := "1.7.0"
version := "1.8.0"

scalaVersion := "2.13.7"
gitbucketVersion := "4.37.0"
gitbucketVersion := "4.36.0"

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.8" % "test"
)

scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps", "-Ydelambdafy:method", "-target:jvm-1.8")
javacOptions in compile ++= Seq("-target", "8", "-source", "8")
libraryDependencies += "net.sourceforge.plantuml" % "plantuml-asl" % "1.2025.0"

useJCenter := true
scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps", "-Ydelambdafy:method", "-target:jvm-1.8")
Compile / javacOptions ++= Seq("-target", "8", "-source", "17")

lazy val downloadPlantuml = taskKey[Unit]("Download the PlantUML ASL Version.")
downloadPlantuml := {
val url = "https://downloads.sourceforge.net/project/plantuml/1.2022.5/plantuml-jar-asl-1.2022.5.zip"
if (java.nio.file.Files.notExists(new File("lib/plantuml.jar").toPath())) {
println(url)
IO.unzipURL(new URL(url), new File("lib"))
}
}
useJCenter := true
3 changes: 2 additions & 1 deletion src/main/scala/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Plugin extends gitbucket.core.plugin.Plugin {
new Version("1.6.0"),
new Version("1.6.1"),
new Version("1.6.2"),
new Version("1.7.0")
new Version("1.7.0"),
new Version("1.8.0")
)

override def initialize(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ trait PlantUMLControllerBase extends ControllerBase {
contentType = "image/svg+xml"
PlantUMLUtils.generateSVGImage(new String(content))
}
case _ => unsupportedMediaType
case _ => unsupportedMediaType()
}
} getOrElse NotFound
} getOrElse NotFound()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was proposed by SBT.

}
})

Expand Down
3 changes: 2 additions & 1 deletion src/test/scala/plugin/PlantUMLUtilsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class PlantUMLUtilsSpec extends FunSpec {
describe("generateSVGImage") {
it("should return a SVG image.") {
val content = new String(PlantUMLUtils.generateSVGImage("@startuml\n@enduml"), "utf-8")
assert(content.startsWith("""<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg"""))
println(content)
assert(content.startsWith("""<svg xmlns="http://www.w3.org/2000/svg" """))
}
it("should return null when empty string") {
assert(PlantUMLUtils.generateSVGImage("") == null)
Expand Down
Loading