-
Is this library supporting the plantuml diagram for doxygen? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi there, I had not tested the # File structure of the repository
.
├── BUILD.bazel
├── MODULE.bazel
└── lib.h # MODULE.bazel
module(name = "rules_doxygen_examples")
bazel_dep(name = "rules_doxygen", dev_dependency = True)
git_override(
module_name = "rules_doxygen",
commit = "60ff34cae67a48d9ff9ca86dc1811b96b5405a5b", # Commit hash you want to use
remote = "https://github.com/TendTo/rules_doxygen.git",
)
bazel_dep(name = "aspect_bazel_lib", version = "2.10.0")
doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_extension")
use_repo(doxygen_extension, "doxygen")
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "plantuml_file",
urls = ["https://github.com/plantuml/plantuml/releases/download/v1.2025.4/plantuml-1.2025.4.jar"],
sha256 = "26518e14a3a04100cd76c0d96cab2d1171f36152215edd9790a28d20268200c1",
downloaded_file_path = "plantuml.jar",
) # BUILD.bazel
load("@doxygen//:doxygen.bzl", "doxygen")
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
# Instead of chasing the jar file who knows where, we copy it in the OUTDIR folder
copy_file(
name = "plantuml",
src = "@plantuml_file//file",
out = "plantuml.jar",
allow_symlink = False,
is_executable = False,
)
doxygen(
name = "doxygen",
srcs = [
"lib.h",
":plantuml",
],
plantuml_jar_path = "$(OUTDIR)",
project_brief = "Example project for doxygen",
project_name = "Plantuml example",
use_default_shell_env = True, # NEW! Allows the use of the default shell environment (i.e., PATH)
) /**
* @file lib.h
* @author Ernesto Casablanca ([email protected])
* @copyright 2024
*/
#pragma once
/**
* @brief Add two integers
*
* Who knows what the result will be?
* In the meantime, look at the graph!
* @startuml "Insightful diagram" width=5cm
* Alice -> Bob : Hello
* @enduml
* @note This function is very complex. Use it with caution.
* @warning The result can be greater than the maximum value that can be stored!
* @param a First integer
* @param b Second integer
* @return Sum of a and b
*/
int add(int a, int b); Admittedly, I haven't tested it thoroughly, so if anything does not work or is not clear, let me know! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the hint. Anyhow my problem is still |
Beta Was this translation helpful? Give feedback.
-
I used your concept, it is working. Just for hint, for the plantuml, |
Beta Was this translation helpful? Give feedback.
Thanks for the hint. Anyhow my problem is still
use_default_shell_env
. I wanted to avoid it.Until now I dont have the solution.