This module provides Bazel build configurations and a macro to integrate the Eclipse DASH license checker into S-CORE Bazel-based project. It includes:
- A
dash_license_checkermacro to create ajava_binaryfor license checking. - A formatter rule to convert
requirements_lock.txtorCargo.lockinto the DASH-compatible JSON format. - The DASH tool JAR embedded directly in the module, so no additional setup is required, downloaded from here
├── BUILD # Defines the embedded dash JAR
├── MODULE.bazel # Bazel module definition
├── dash.bzl # Contains the dash_license_checker macro
├── org.eclipse.dash.licenses-1.1.0.jar # Embedded DASH license checker
├── tool/
│ └── formatters/
│ ├── BUILD
│ ├── dash_format_converter.bzl
│ └── dash_format_converter.py
└── README.md- Uses
java_importto expose the embeddedorg.eclipse.dash.licenses-1.1.0.jaras a Bazel target//:jar.
- Declares this directory as a Bazel module:
dash_license_checker.
- Provides the macro
dash_license_checkerto:- Convert a lockfile into the DASH-compatible format.
- Run the DASH license checker using the embedded JAR.
- Auto-detect
file_typefrom a project config (e.g. Rust or Python).
- Custom Bazel rule
dash_format_converterthat wraps the Python script for converting inputs.
- Transforms
requirements_lock.txtorCargo.lockinto the required JSON format.
In the consuming Bazel project:
bazel_dep(name = "dash_license_checker", version = "0.1.0")load("@dash_license_checker//:dash.bzl", "dash_license_checker")
filegroup(
name = "requirements_lock",
srcs = ["requirements_lock.txt"],
)
dash_license_checker(
name = "python_license_check",
src = "//:requirements_lock",
visibility = ["//visibility:public"],
)filegroup(
name = "cargo_lock",
srcs = ["Cargo.lock"],
)
dash_license_checker(
name = "rust_license_check",
src = "//:cargo_lock",
visibility = ["//visibility:public"],
file_type = "cargo",
#optional
skip_source_filter = False, # internal packages(that dont contain source) are skipped, only 3rd party verified
filter_keywords = ["qorix-group", "eclipse-score"] # keywords to filter packages containing this words
)Running the generated target will:
- Convert the input lockfile to DASH-compatible JSON.
- Run the embedded DASH license checker JAR.
- Output licensing report or violations to standard output.
✅ No need to fetch the JAR separately — it's embedded. ✅ Language-agnostic input support (Python, Rust). ✅ Fully reproducible and self-contained via Bazel module.