Skip to content

Commit

Permalink
Download plantuml.jar by sbt task
Browse files Browse the repository at this point in the history
  • Loading branch information
nus committed Jun 18, 2018
1 parent 85f92a3 commit 5836799
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 205 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ project/plugins/project/

# Ensime
.ensime
.ensime_cache/
.ensime_cache/

/lib
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jdk:
- oraclejdk8

script:
- sbt test
- sbt downloadPlantuml test

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Building
Run the command below in the root directory of the plug-in in order to build it:

```
sbt assembly
sbt downloadPlantuml assembly
```

The plugin is built at `target/scala-2.12/gitbucket-plantuml-plugin-assembly-x.y.z.jar` and it should be copied to ```$GITBUCKET_HOME/plugins/``` directory.
Expand Down
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ libraryDependencies ++= Seq(
scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps", "-Ydelambdafy:method", "-target:jvm-1.8")
javacOptions in compile ++= Seq("-target", "8", "-source", "8")

useJCenter := true
useJCenter := true

lazy val downloadPlantuml = taskKey[Unit]("Download the PlantUML ASL Version.")
downloadPlantuml := {
val url = "https://excellmedia.dl.sourceforge.net/project/plantuml/1.2018.7/plantuml-jar-asl-1.2018.7.zip"
if (java.nio.file.Files.notExists(new File("lib/plantuml.jar").toPath())) {
println(url)
IO.unzipURL(new URL(url), new File("lib"))
}
}
198 changes: 0 additions & 198 deletions lib/COPYING

This file was deleted.

Binary file removed lib/plantuml.jar
Binary file not shown.
3 changes: 0 additions & 3 deletions lib/plantuml_version.txt

This file was deleted.

0 comments on commit 5836799

Please sign in to comment.