StigExtension

open class StigExtension(project: Project)

Project-phase STIG extension. Created per-project by StigPlugin.apply().

IMPORTANT: This class must NOT store a Project reference as a field. Task closures capture extension (this object); if it held a Project, Gradle's configuration cache would fail when serializing those tasks. All Project-dependent values are resolved eagerly during construction and stored as plain values or Gradle managed types (Property/DirectoryProperty).

Constructors

Link copied to clipboard
constructor(project: Project)

Properties

Link copied to clipboard
val annotationFiles: ConfigurableFileCollection

Optional list of annotation files.

Link copied to clipboard
val basePackagePrefix: Property<String>

Reverse-domain prefix prepended to synthesized Kotlin packages. Empty when unset.

Link copied to clipboard
val buildType: Property<BuildType>

How the repository should be interpreted (Bazel/CMake/BuildStream).

Link copied to clipboard

Project-level defaults for diagram output formats. Acts as the middle layer in the element → group → defaults cascade. Unset fields here fall through to the factory (true for every format).

Link copied to clipboard

Per-module element configuration captured from stig { element { ... } } blocks. Null until the consumer configures it.

Link copied to clipboard
Link copied to clipboard
val interfaceLocation: DirectoryProperty

Optional directory containing interface definition files.

Link copied to clipboard

Interface point mode (sources or interface files).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Default placement for viewpoints.

Link copied to clipboard
val projectRoot: DirectoryProperty

Project root directory used for path resolution. Defaults to the root project directory.

Link copied to clipboard

Resolved repository locations (publish source repos, Dokka repo info). Derived from the DSL-configured repos; computed once at extension creation.

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun element(configure: StigElementExtension.() -> Unit)
Link copied to clipboard
fun modelCheck(configure: ModelCheckDsl.() -> Unit)

Module-wide check policy, including libraries without an element block.

Link copied to clipboard
Link copied to clipboard
fun module(configure: StigModuleExtension.() -> Unit)
Link copied to clipboard
fun resolveAnalyzerRepoMap(rootProjectName: String, rootProjectDir: File): Map<String, String>

Returns the analyzer's --repo NAME=PATH map: every DSL-configured repo (under stigProject { repos { … } }) whose implementationRoot resolves to a directory on disk. Falls back to a single entry { rootProject.name → rootDir } when no repos are configured so single-repo projects work with zero DSL setup.

Link copied to clipboard

Returns the merged BazelBuildConfig for this element by cascading defaults → repo → group → element, following the same merge order as com.stigway.gradle.config.resolveProjectStigElement. Returns null when no bazel config is set at any level.

Link copied to clipboard

Resolves defaults/group/element activations against the project registry.

Link copied to clipboard

Resolves defaults/group/element activations against the project registry.

Link copied to clipboard

Resolves diagram outputs through element → group → defaults → factory.

Link copied to clipboard

The element's configured ASIL, cascaded element → group → defaults. null if never declared at any level. The diagram pipeline compares this against the propagated (MAX-of-contents) ASIL and flags a mismatch.

Link copied to clipboard

The element type after the element -> group -> defaults cascade.

Link copied to clipboard

Resolves the single effective pipeline failure threshold for this element.

Link copied to clipboard

Resolves modelCheck { } via defaults → group → element → module. Unset viewpoint fields inherit independently; final task default is enabled=true.

Link copied to clipboard

Resolves analyzer Z3 path-feasibility mode through the same element → group → defaults cascade as other code-analysis knobs.

Link copied to clipboard

Resolves P3 compile-database filtering by cascading defaults → group → element. Each parameter is inherited independently: a lower-level mode does not reset inherited includes/excludes, and an explicitly assigned empty list clears the inherited list for that parameter.

Link copied to clipboard
fun resolveRepoRootDir(fallback: File): File

Resolves the repo root directory for the current element, using the element → group → defaults cascade to find the source profile, then looking up the implementationRoot from the project config context.

Link copied to clipboard

Resolves P4 compilation-scope selection by cascading defaults → group → element.

Link copied to clipboard

Resolves the effective source-code analysis toggles by cascading element → group → defaults → project-wide sourceCodeAnalysis { }.

Link copied to clipboard

Resolves P7 source-code selection by cascading defaults → group → element.

Link copied to clipboard

Resolves the effective StubsConfig for this element by cascading defaults → group → element. Each property cascades independently; an explicitly assigned empty list clears only that inherited list.

Link copied to clipboard

Resolves whether Bazel C++ action inputs should invalidate source-code analysis. The value cascades with the rest of bazel { }; final default is true.