Skip to content

Commit 267ddf8

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

33 files changed

+3088
-1319
lines changed

.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

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ copyright_checker(
3636
visibility = ["//visibility:public"],
3737
)
3838

39+
3940
use_format_targets()

MODULE.bazel

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module(
2020
###############################################################################
2121
# Core Dependencies
2222
###############################################################################
23-
bazel_dep(name = "rules_python", version = "1.4.1")
23+
bazel_dep(name = "rules_python", version = "1.7.0")
2424
bazel_dep(name = "aspect_rules_py", version = "1.4.0")
2525
bazel_dep(name = "aspect_rules_lint", version = "1.5.3")
2626
bazel_dep(name = "rules_shell", version = "0.5.0")
@@ -29,7 +29,7 @@ bazel_dep(name = "rules_rust", version = "0.61.0")
2929
bazel_dep(name = "rules_multitool", version = "1.9.0")
3030
bazel_dep(name = "score_rust_policies", version = "0.0.2")
3131

32-
bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True)
32+
bazel_dep(name = "bazel_skylib", version = "1.8.2", dev_dependency = True)
3333

3434
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
3535

@@ -95,3 +95,13 @@ 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+
106+
bazel_dep(name = "score_platform", version = "0.5.0")
107+
bazel_dep(name = "score_process", version = "1.3.2")

bazel/rules/score_module/BUILD

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

bazel/rules/score_module/docs/conf.py

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

0 commit comments

Comments
 (0)