UML and class inheritance view
This commit is contained in:
parent
01be544962
commit
61e42fcfc4
2 changed files with 52 additions and 4 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -41,5 +41,8 @@ gradle-app.setting
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
replay_pid*
|
replay_pid*
|
||||||
|
*.puml
|
||||||
|
*.mmd
|
||||||
|
*.svg
|
||||||
|
*.png
|
||||||
*.minisig
|
*.minisig
|
||||||
|
|
51
makefile
51
makefile
|
@ -3,6 +3,11 @@ GITHASH := $(shell git rev-parse --short HEAD)$(shell git diff-index --quiet HEA
|
||||||
TARNAME := xl-imbus_$(GITHASH).tar.gz
|
TARNAME := xl-imbus_$(GITHASH).tar.gz
|
||||||
DIRNAME := xl
|
DIRNAME := xl
|
||||||
|
|
||||||
|
MERMAID := java -jar java2umltext.jar --no-constructors --no-method-relationships --no-field-relationships MERMAID
|
||||||
|
|
||||||
|
UMLDIRNAME := xl_diagrams_$(GITHASH)
|
||||||
|
UMLTARNAME := $(UMLDIRNAME).tar.gz
|
||||||
|
|
||||||
run:
|
run:
|
||||||
./gradlew run
|
./gradlew run
|
||||||
|
|
||||||
|
@ -16,6 +21,7 @@ build:
|
||||||
clean:
|
clean:
|
||||||
./gradlew clean
|
./gradlew clean
|
||||||
rm -f *.tar.gz *.tar.gz.minisig *.zip *.jpg
|
rm -f *.tar.gz *.tar.gz.minisig *.zip *.jpg
|
||||||
|
rm -f *.jar *.mmd *.puml *.png *.svg
|
||||||
|
|
||||||
test:
|
test:
|
||||||
./gradlew test
|
./gradlew test
|
||||||
|
@ -35,12 +41,51 @@ tar: $(TARNAME)
|
||||||
|
|
||||||
sign: $(TARNAME).minisig
|
sign: $(TARNAME).minisig
|
||||||
|
|
||||||
|
inherit:
|
||||||
|
nu -c 'rg -Ioi ".*class .* (extends|implements).*\\{" | sd " *\\{" "" | lines | sort | save -f inheritance.txt'
|
||||||
|
|
||||||
|
install-mermaid:
|
||||||
|
npm install -g @mermaid-js/mermaid-cli
|
||||||
|
|
||||||
publish: $(TARNAME) $(TARNAME).minisig
|
publish: $(TARNAME) $(TARNAME).minisig
|
||||||
@git diff-index --quiet HEAD || (echo "git is dirty, commit changes first"; exit 1)
|
@git diff-index --quiet HEAD || (echo "git is dirty, commit changes first"; exit 1)
|
||||||
ssh server mkdir -p /public/$(DIRNAME)
|
ssh server mkdir -p /public/$(DIRNAME)
|
||||||
rsync -avz $(TARNAME).minisig server:/public/$(DIRNAME)/$(TARNAME).minisig
|
rsync -avz $(TARNAME).minisig server:/public/$(DIRNAME)/$(TARNAME).minisig
|
||||||
rsync -avz $(TARNAME) server:/public/$(DIRNAME)/$(TARNAME)
|
rsync -avz $(TARNAME) server:/public/$(DIRNAME)/$(TARNAME)
|
||||||
ssh server ln -sf /public/$(DIRNAME)/$(TARNAME).minisig /public/$(DIRNAME)/latest.tar.gz.minisig
|
ssh server ln -sf /public/$(DIRNAME)/$(TARNAME).minisig /public/$(DIRNAME)/xl-imbus-latest.tar.gz.minisig
|
||||||
ssh server ln -sf /public/$(DIRNAME)/$(TARNAME) /public/$(DIRNAME)/latest.tar.gz
|
ssh server ln -sf /public/$(DIRNAME)/$(TARNAME) /public/$(DIRNAME)/xl-imbus-latest.tar.gz
|
||||||
|
|
||||||
.PHONY: run watch build clean test archive sign publish
|
java2umltext.jar:
|
||||||
|
curl --progress-bar -L -o java2umltext.jar https://github.com/feitosa-daniel/java2umltext/releases/download/v0.1.0/java2umltext-0.1.0.jar
|
||||||
|
@echo -n "5d0368b1bebe7cee289d0febc0433d5a4c120762b7ca611948f828bc955c44f6 java2umltext.jar" | sha256sum -c || \
|
||||||
|
(echo "Checksum mismatch, something fishy is up"; rm -f java2umltext.jar; exit 1)
|
||||||
|
|
||||||
|
uml: java2umltext.jar
|
||||||
|
$(MERMAID) app/src/main/java/model > diagrams_model.mmd
|
||||||
|
$(MERMAID) app/src/main/java/expr > diagrams_expr.mmd
|
||||||
|
$(MERMAID) app/src/main/java/gui > diagrams_gui.mmd
|
||||||
|
$(MERMAID) app/src/main/java/menu > diagrams_menu.mmd
|
||||||
|
$(MERMAID) app/src/main/java/util > diagrams_util.mmd
|
||||||
|
|
||||||
|
mmdc -q -i diagrams_model.mmd -o diagrams_model.svg -t dark -b transparent
|
||||||
|
mmdc -q -i diagrams_expr.mmd -o diagrams_expr.svg -t dark -b transparent
|
||||||
|
mmdc -q -i diagrams_gui.mmd -o diagrams_gui.svg -t dark -b transparent
|
||||||
|
mmdc -q -i diagrams_menu.mmd -o diagrams_menu.svg -t dark -b transparent
|
||||||
|
mmdc -q -i diagrams_util.mmd -o diagrams_util.svg -t dark -b transparent
|
||||||
|
|
||||||
|
mmdc -q -i diagrams_model.mmd -o diagrams_model.png
|
||||||
|
mmdc -q -i diagrams_expr.mmd -o diagrams_expr.png
|
||||||
|
mmdc -q -i diagrams_gui.mmd -o diagrams_gui.png
|
||||||
|
mmdc -q -i diagrams_menu.mmd -o diagrams_menu.png
|
||||||
|
mmdc -q -i diagrams_util.mmd -o diagrams_util.png
|
||||||
|
|
||||||
|
@tar --transform 's,^,$(UMLDIRNAME)/,' -czf $(UMLTARNAME) diagrams_*.{mmd,png,svg}
|
||||||
|
tar -tvf $(UMLTARNAME)
|
||||||
|
@# java -jar java2umltext.jar PLANTUML app/src/main/java/model > diagrams.puml
|
||||||
|
@# Optionally stamp out to PNG with plantuml and mmdc cli tools here
|
||||||
|
|
||||||
|
umlpublish: $(UMLTARNAME)
|
||||||
|
ssh server mkdir -p /public/$(DIRNAME)/diagrams
|
||||||
|
rsync -avz $(UMLTARNAME) server:/public/$(DIRNAME)/diagrams/$(UMLTARNAME)
|
||||||
|
|
||||||
|
.PHONY: run watch build clean test archive sign publish uml umlpublish
|
||||||
|
|
Loading…
Reference in a new issue