Skip to content

Commit a02bb9d

Browse files
committed
[Module API] Introduce build per module
Incorporated first feedback. Introduced a modular sphinx-build.
1 parent ede4965 commit a02bb9d

32 files changed

Lines changed: 3112 additions & 1320 deletions

.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
22
common --registry=https://bcr.bazel.build
3+
4+
build --java_language_version=17
5+
build --tool_java_language_version=17
6+
build --java_runtime_version=remotejdk_17
7+
build --tool_java_runtime_version=remotejdk_17

MODULE.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,12 @@ multitool.hub(
9595
lockfile = "tools/yamlfmt.lock.json",
9696
)
9797
use_repo(multitool, "yamlfmt_hub")
98+
99+
bazel_dep(name = "score_docs_as_code", version = "2.2.0")
100+
git_override(
101+
module_name = "score_docs_as_code",
102+
commit = "be61c922ef9c3bf70dc7d3a5a1cb0c14f6e95d20",
103+
remote = "https://github.com/eclipse-score/docs-as-code.git",
104+
)
105+
bazel_dep(name = "score_platform", version = "0.5.0")
106+
bazel_dep(name = "score_process", version = "1.3.2")

bazel/rules/score_module/BUILD

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
load(
2+
"//bazel/rules/score_module:score_module.bzl",
3+
"score_module",
4+
)
5+
6+
exports_files([
7+
"templates/conf.template.py",
8+
"templates/seooc_index.template.rst",
9+
])
10+
11+
# HTML merge tool
12+
py_binary(
13+
name = "sphinx_html_merge",
14+
srcs = ["src/sphinx_html_merge.py"],
15+
main = "src/sphinx_html_merge.py",
16+
visibility = ["//visibility:public"],
17+
)
18+
19+
# Sphinx build binary with all required dependencies
20+
py_binary(
21+
name = "score_build",
22+
srcs = ["src/sphinx_wrapper.py"],
23+
data = [],
24+
env = {
25+
"SOURCE_DIRECTORY": "",
26+
"DATA": "",
27+
"ACTION": "check",
28+
},
29+
main = "src/sphinx_wrapper.py",
30+
visibility = ["//visibility:public"],
31+
deps = [
32+
"@score_docs_as_code//src:plantuml_for_python",
33+
"@score_docs_as_code//src/extensions/score_sphinx_bundle",
34+
],
35+
)
36+
37+
score_module(
38+
name = "score_module",
39+
srcs = glob(
40+
[
41+
"docs/**/*.rst",
42+
],
43+
allow_empty = True,
44+
),
45+
index = "docs/index.rst",
46+
visibility = ["//visibility:public"],
47+
deps = [
48+
"@score_process//:score_process_module",
49+
],
50+
)

bazel/rules/score_module/docs/conf.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)