Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AnnotationArgumentDeclaration(val name: String?, val value: String)

Represents an argument passed to a Kotlin annotation.

Link copied to clipboard
@Serializable
data class AnnotationDeclaration(val name: String, val fqName: String, val arguments: List<AnnotationArgumentDeclaration> = emptyList())

Represents a parsed Kotlin annotation declared on a class.

Link copied to clipboard

First-class, declarative architectural-layer policy DSL.

Link copied to clipboard

First-class, declarative source-set architecture policy DSL.

Link copied to clipboard
@Serializable
data class ClassDeclaration(val name: String, val fqName: String, val packageName: String, val isInterface: Boolean, val isAbstract: Boolean, val annotations: List<AnnotationDeclaration>, val imports: List<String>, val referencedTypes: Set<String>, val filePath: String, val visibility: Visibility = Visibility.PUBLIC, val modifiers: Set<Modifier> = emptySet(), val supertypes: List<String> = emptyList(), val primaryConstructor: ConstructorDeclaration? = null, val secondaryConstructors: List<ConstructorDeclaration> = emptyList(), val functions: List<FunctionDeclaration> = emptyList(), val properties: List<PropertyDeclaration> = emptyList(), val companionObject: ClassDeclaration? = null, val kdocText: String? = null, val importAliases: Map<String, String> = emptyMap(), val isEnum: Boolean = false, val sourceLine: Int = -1)

Represents a parsed Kotlin class, interface, or object declaration.

Link copied to clipboard

Context receiver for writing declarative assertions on a ClassDeclaration element. Provides easy access to all element properties and custom helper assertions.

Link copied to clipboard
class ClassesRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector = SourceSets.production())

A builder for compiling and verifying architectural rules on Kotlin classes.

Link copied to clipboard

Fluent API for defining assertion rules on Kotlin classes.

Link copied to clipboard

Fluent API for defining assertion rules on Kotlin classes.

Link copied to clipboard

Fluent API for defining assertion rules on Kotlin classes.

Link copied to clipboard

Fluent API for defining assertion rules on Kotlin classes.

Link copied to clipboard
Link copied to clipboard

Trait interface for composite, logical and custom predicate filtering on classes.

Link copied to clipboard

Trait interface for metadata, annotations, modifiers and visibility filtering on classes.

Link copied to clipboard

Trait interface for name matching and naming pattern filtering on classes.

Link copied to clipboard

Trait interface for package and module residency filtering on classes.

Link copied to clipboard

Common scope interface providing access to ClassesRuleBuilder.

Link copied to clipboard

Trait interface for structural, hierarchy, member and type assignability filtering on classes.

Link copied to clipboard

Typealias for class scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a ClassSelector.

Link copied to clipboard
@Serializable
data class ConstructorDeclaration(val visibility: Visibility, val parameters: List<ParameterDeclaration>, val annotations: List<AnnotationDeclaration>)

Represents a constructor declaration of a Kotlin class.

Link copied to clipboard
data class Dependency(val configuration: String, val targetBuildId: String, val targetPath: String)

Represents a declared project-to-project dependency edge at runtime.

Link copied to clipboard
@Serializable
data class FileDeclaration(val name: String, val packageName: String, val imports: List<String> = emptyList(), val classes: List<ClassDeclaration> = emptyList(), val topLevelFunctions: List<FunctionDeclaration> = emptyList(), val topLevelProperties: List<PropertyDeclaration> = emptyList(), val kdocText: String? = null, val filePath: String = "", val importAliases: Map<String, String> = emptyMap(), val sourceSets: List<SourceSetId> = emptyList(), val usages: List<SourceUsage> = emptyList(), val annotations: List<AnnotationDeclaration> = emptyList())

Represents a source file declaration containing classes, functions, properties, and imports.

Link copied to clipboard
data class FileDeclarationContext(val declaration: FileDeclaration, val modulePath: String, val sourceSet: SourceSetId? = null)

Context wrapper for verifying source file declarations.

Link copied to clipboard

Context receiver for writing declarative assertions on a FileDeclarationContext element. Provides easy access to all element properties and custom helper assertions.

Link copied to clipboard

Typealias for file scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a FileSelector.

Link copied to clipboard
class FilesRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector = SourceSets.production())

A builder for compiling and verifying architectural rules on Kotlin source files.

Link copied to clipboard

Assertion builder for checking rule expectations on Kotlin file declarations.

Link copied to clipboard

Composite condition assertions for file rules.

Link copied to clipboard

Content-based assertions for file rules.

Link copied to clipboard

Path and package assertions for file rules.

Link copied to clipboard
class FilesThat

Filter builder for selecting file declarations matching specific conditions.

Link copied to clipboard
interface FilesThatScope

Common scope interface providing access to FilesRuleBuilder.

Link copied to clipboard

Assertion scope DSL for configuring rule expectations on Kotlin functions.

Link copied to clipboard
@Serializable
data class FunctionDeclaration(val name: String, val visibility: Visibility, val modifiers: Set<Modifier>, val returnType: String, val parameters: List<ParameterDeclaration>, val annotations: List<AnnotationDeclaration>, val kdocText: String?, val isExtension: Boolean, val sourceStartOffset: Int = -1, val sourceEndOffset: Int = -1, val resolvedReturnType: String? = null, val sourceLine: Int = -1, val receiverType: String? = null)

Represents a parsed function declaration within a Kotlin source file.

Link copied to clipboard
data class FunctionDeclarationContext(val declaration: FunctionDeclaration, val packageName: String, val className: String?, val modulePath: String, val filePath: String, val sourceSet: SourceSetId? = null, val usages: List<SourceUsage> = emptyList())

Context wrapper for verifying function declarations.

Link copied to clipboard

Context receiver for writing declarative assertions on a FunctionDeclarationContext element. Provides easy access to all element properties and custom helper assertions.

Link copied to clipboard

Typealias for function scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a FunctionSelector.

Link copied to clipboard
class FunctionsRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector = SourceSets.production())

A builder for compiling and verifying architectural rules on Kotlin function declarations.

Link copied to clipboard

Member call assertions for function rules.

Link copied to clipboard

Composite condition assertions for function rules.

Link copied to clipboard

Package dependency assertions for function rules.

Link copied to clipboard

Modifier and visibility assertions for function rules.

Link copied to clipboard

Naming and package assertions for function rules.

Link copied to clipboard

Signature and type assertions for function rules.

Link copied to clipboard

Trait interface for composite, logical and custom predicate filtering on functions.

Link copied to clipboard

Trait interface for filtering functions by package dependencies.

Link copied to clipboard

Trait interface for modifiers, annotations, visibility and modifier filtering on functions.

Link copied to clipboard

Trait interface for name matching and naming pattern filtering on functions.

Link copied to clipboard

Trait interface for package and module residency filtering on functions.

Link copied to clipboard

Common scope interface providing access to FunctionsRuleBuilder.

Link copied to clipboard

Trait interface for structural, parameter, return type and declaration location filtering on functions.

Link copied to clipboard

Formatter for building semantic HTML error reports from architecture violation reports.

Link copied to clipboard

Formatter for building human-readable error messages from architecture violation reports.

Link copied to clipboard
object Konture

Main entry point for Konture. All architecture assertion builders, scoping builders, and graph configurations are extended from or accessible through this object.

Link copied to clipboard
class KontureContext(projectGraph: ProjectGraph)

DSL Context wrapper that allows defining and verifying multiple independent rule suites.

Link copied to clipboard
annotation class KontureDsl

DSL Marker for Konture DSL structures.

Link copied to clipboard

Represents a scope containing a set of Kotlin files for checking file-level rules.

Link copied to clipboard

Represents a scope containing a set of function declaration contexts for checking function-level rules in a Konsist-inspired fluent DSL.

Link copied to clipboard
class KontureModuleScope(val modules: List<Module>)

Represents a functional scope containing a set of Gradle Module structures for inspection and assertions.

Link copied to clipboard

Represents a scope containing a set of property declaration contexts for checking property-level rules in a Konsist-inspired fluent DSL.

Link copied to clipboard
class KontureScope(val classes: List<ClassDeclaration>)

Represents a scope containing a set of classes for writing architecture rules in a Konsist-inspired fluent DSL.

Link copied to clipboard
class KontureSliceScope(val slices: List<Slice>)

Represents a functional scope containing a set of derived Slice objects for inspection and assertions.

Link copied to clipboard
class LayeredArchitectureBuilder(graph: ProjectGraph = Konture.projectGraph)

A builder class implementing the Layered Architecture DSL.

Link copied to clipboard

Type-safe, nested DSL for defining and verifying layered architecture rules.

Link copied to clipboard

Selector DSL used within ArchitectureLayerPolicy.selector to define a layer's member modules and/or packages.

Link copied to clipboard
@Serializable
enum Modifier : Enum<Modifier>

Represents declaration modifiers in Kotlin source code (e.g. abstract, open, sealed, suspend, override).

Link copied to clipboard
data class Module(val buildId: String, val path: String, val projectDir: String, val appliedPlugins: List<String>, val sourceSets: List<SourceSet>, val dependencies: List<Dependency>, val files: List<FileDeclaration> = emptyList())

Represents a single Gradle module/project and all its structural and source declarations.

Link copied to clipboard

Typealias for module scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a ModuleSelector.

Link copied to clipboard

Context receiver for writing declarative assertions on a Module element. Provides easy access to all element properties and custom helper assertions.

Link copied to clipboard
class ModulesRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector? = null)

A builder for compiling and verifying architectural rules on project modules.

Link copied to clipboard

Composite condition assertions for Gradle module rules.

Link copied to clipboard

Outbound dependency assertions for Gradle module rules.

External dependency assertions for Gradle module rules.

Link copied to clipboard

Inbound dependency assertions for Gradle module rules.

Link copied to clipboard

Structural assertions for Gradle module rules.

Link copied to clipboard

Fluent API for defining filtering conditions on Gradle modules.

Link copied to clipboard

Common scope interface providing access to ModulesRuleBuilder.

Link copied to clipboard

Output format modes for formatting architecture violation reports.

Link copied to clipboard
@Serializable
data class ParameterDeclaration(val name: String, val type: String, val hasDefaultValue: Boolean, val annotations: List<AnnotationDeclaration>, val resolvedType: String? = null)

Represents a parameter in a function or constructor declaration.

Link copied to clipboard

Known default platform namespaces used for platform-independence checks in Kotlin Multiplatform projects.

Link copied to clipboard

Formatter for building IDE and CI problem-matcher compatible error outputs from architecture violation reports.

Link copied to clipboard

Programmatic suppression descriptor.

Link copied to clipboard
data class ProjectGraph(val builds: Map<String, List<Module>>, externalDependenciesLoader: () -> DependencyGraphModel? = { DependencyGraphModel() })

Represents the complete structural graph of the multi-project/composite build. It provides core querying capabilities, circular dependency verification, and access to the parsed class/declaration hierarchy of the entire workspace.

Link copied to clipboard
class PropertiesRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector = SourceSets.production())

A builder for compiling and verifying architectural rules on Kotlin property declarations.

Link copied to clipboard
Link copied to clipboard

Composite condition assertions for property rules.

Link copied to clipboard

Package dependency assertions for property rules.

Link copied to clipboard

Modifier and visibility assertions for property rules.

Link copied to clipboard

Type and package assertions for property rules.

Link copied to clipboard

Filter builder for selecting property declarations matching specific conditions.

Link copied to clipboard

Common scope interface providing access to PropertiesRuleBuilder.

Link copied to clipboard

Assertion scope DSL for configuring rule expectations on Kotlin properties.

Link copied to clipboard
@Serializable
data class PropertyDeclaration(val name: String, val visibility: Visibility, val modifiers: Set<Modifier>, val type: String, val isVal: Boolean, val annotations: List<AnnotationDeclaration>, val kdocText: String?, val isExtension: Boolean = false, val resolvedType: String? = null, val sourceLine: Int = -1, val receiverType: String? = null)

Represents a property declaration within a Kotlin class or source file.

Link copied to clipboard
data class PropertyDeclarationContext(val declaration: PropertyDeclaration, val packageName: String, val className: String?, val modulePath: String, val filePath: String, val sourceSet: SourceSetId? = null, val usages: List<SourceUsage> = emptyList())

Context wrapper for verifying property declarations.

Link copied to clipboard

Context receiver for writing declarative assertions on a PropertyDeclarationContext element. Provides easy access to all element properties and custom helper assertions.

Link copied to clipboard

Typealias for property scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a PropertySelector.

Link copied to clipboard

Confidence level of a resolved symbol usage in source code analysis.

Link copied to clipboard
class RuleBuilder(val id: String, projectGraph: ProjectGraph = Konture.projectGraph)

DSL builder for configuring named architecture rules with metadata and sub-rule blocks.

Link copied to clipboard

Encapsulates a named architecture rule with its metadata and evaluation logic.

Link copied to clipboard
typealias RuleMetadata = io.github.baole.konture.core.model.RuleMetadata
Link copied to clipboard
class RuleSet

Encapsulates a reusable collection of architectural rules and policies.

Link copied to clipboard
class RuleSetBuilder(var name: String? = null)

DSL builder for configuring a reusable RuleSet.

Link copied to clipboard

DSL builder for configuring programmatic violation suppressions with mandatory audit reasons.

Link copied to clipboard
interface SatisfyContext<T>

Receiver context provided inside satisfy custom predicate assertion blocks.

Link copied to clipboard
data class Slice(val key: String, val packages: Set<String>, val classes: List<ClassDeclaration>)

A group of packages sharing the same slice key, derived from a slice pattern's capture group.

Link copied to clipboard

Typealias for slice scope selector.

Link copied to clipboard

Fluent assertion receiver for sequential assertions on a SliceSelector.

Link copied to clipboard

Context receiver for writing declarative assertions on a SliceGraph.

Link copied to clipboard
class SlicesRuleBuilder(graph: ProjectGraph = Konture.projectGraph, sourceSets: SourceSetSelector = SourceSets.production())

A builder for compiling and verifying architectural rules on slices — groups of packages derived from a package pattern with a capture group.

Link copied to clipboard

Assertions that the slices derived by SlicesRuleBuilder must satisfy.

Link copied to clipboard

Filter builder for selecting architectural slices matching specific conditions.

Link copied to clipboard
data class SourceSet(val name: String, val kind: String, val production: Boolean, val srcDirs: List<String>, val platforms: List<String> = emptyList(), val dependsOnSourceSets: List<String> = emptyList())

Represents a source set within a module at test runtime.

Link copied to clipboard
@Serializable
data class SourceSetId(val modulePath: String, val name: String, val kind: SourceSetKind, val role: SourceSetRole)

A source set as exposed to architecture rules.

Link copied to clipboard
@Serializable
enum SourceSetKind : Enum<SourceSetKind>

Broad technology stack classification of a source set.

Link copied to clipboard
@Serializable
enum SourceSetRole : Enum<SourceSetRole>

Indicates whether a source set contains production or test code.

Link copied to clipboard
object SourceSets

Factory methods for selecting captured Kotlin source sets.

Link copied to clipboard

Immutable selector used by source-backed Konture entry points.

Link copied to clipboard
@Serializable
data class SourceUsage(val kind: UsageKind, val targetFqName: String, val filePath: String, val line: Int, val column: Int, val enclosingFunction: String? = null, val enclosingClass: String? = null, val enclosingProperty: String? = null, val rawExpression: String = targetFqName, val sourceSets: List<SourceSetId> = emptyList(), val possibleTargetFqNames: List<String> = emptyList(), val unresolvedPossibleUsage: Boolean = false, val confidence: ResolutionConfidence = if (unresolvedPossibleUsage) { ResolutionConfidence.POSSIBLE } else { ResolutionConfidence.RESOLVED }, val sourceStartOffset: Int = -1, val sourceEndOffset: Int = -1, val enclosingFunctionStartOffset: Int = -1, val enclosingFunctionEndOffset: Int = -1)

A resolved (or conservatively possible) Kotlin source usage.

Link copied to clipboard
@Serializable
enum UsageKind : Enum<UsageKind>

Category of source code usage (e.g. function call or class reference).

Link copied to clipboard
@Serializable
enum Visibility : Enum<Visibility>

Represents the visibility modifier of a Kotlin declaration (public, internal, protected, or private).

Properties

Link copied to clipboard

Delegates annotations property to the underlying FunctionDeclaration.

Delegates annotations property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates classes property to the underlying FileDeclaration.

Link copied to clipboard

Synonym for scope representing class-level functional scope for the entire project.

Link copied to clipboard

Retrieves a file-level functional KontureFileScope representing all files in the project.

Link copied to clipboard

Retrieves a function-level functional KontureFunctionScope representing all functions in the project.

Link copied to clipboard

Delegates imports property to the underlying FileDeclaration.

Link copied to clipboard

Delegates isExtension property to the underlying FunctionDeclaration.

Delegates isExtension property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates isVal property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates isVar property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates kdocText property to the underlying FunctionDeclaration.

Delegates kdocText property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates modifiers property to the underlying FunctionDeclaration.

Delegates modifiers property to the underlying PropertyDeclaration.

Link copied to clipboard

Retrieves a module-level functional KontureModuleScope representing all modules in the project.

Link copied to clipboard

Delegates name property to the underlying FileDeclaration.

Delegates name property to the underlying FunctionDeclaration.

Delegates name property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates packageName property to the underlying FileDeclaration.

Link copied to clipboard

Delegates parameters property to the underlying FunctionDeclaration.

Link copied to clipboard

Retrieves a property-level functional KonturePropertyScope representing all properties in the project.

Link copied to clipboard

Delegates returnType property to the underlying FunctionDeclaration.

Link copied to clipboard

Retrieves a class-level functional KontureScope representing the entire project.

Link copied to clipboard

Delegates topLevelFunctions property to the underlying FileDeclaration.

Link copied to clipboard

Delegates topLevelProperties property to the underlying FileDeclaration.

Link copied to clipboard

Delegates type property to the underlying PropertyDeclaration.

Link copied to clipboard

Delegates visibility property to the underlying FunctionDeclaration.

Delegates visibility property to the underlying PropertyDeclaration.

Functions

Link copied to clipboard

Asserts that classes have annotation type parameter T.

Filters classes having annotation type parameter T.

Asserts that files are annotated with the annotation type parameter T.

Filters files annotated with the annotation type parameter T.

Asserts that classes have the specified annotation class.

Filters classes having the specified annotation class.

Asserts that files are annotated with the specified annotation class.

Filters files annotated with the specified annotation class.

Filters functions annotated with annotationName.

Filters properties annotated with annotationName.

Link copied to clipboard

Asserts that classes have all of the specified annotations.

Filters classes having all of the specified annotations.

Link copied to clipboard

Asserts that classes have any of the specified annotations.

Filters classes having any of the specified annotations.

Link copied to clipboard
fun architecture(block: KontureContext.() -> Unit)

Top-level entry point for defining and running architecture rule blocks.

fun architecture(graph: ProjectGraph, block: KontureContext.() -> Unit)

Top-level entry point for defining and running architecture rule blocks against a specific ProjectGraph.

Link copied to clipboard

Unified multi-rule block supporting modules, classes, and layered architecture validations. Runs every declared suite and aggregates all violations before failing.

Unified multi-rule block supporting modules, classes, and layered architecture validations against a specific ProjectGraph. Runs every declared suite and aggregates all violations before failing.

Link copied to clipboard

Top-level builder function for defining a reusable RuleSet.

fun architectureRules(name: String? = null, block: RuleSetBuilder.() -> Unit): RuleSet

Top-level builder function for defining a reusable, named RuleSet.

Link copied to clipboard

Builder function on Konture for defining a reusable RuleSet.

fun Konture.architectureRules(name: String? = null, block: RuleSetBuilder.() -> Unit): RuleSet

Builder function on Konture for defining a reusable, named RuleSet.

Link copied to clipboard

Filters properties annotated with annotation type parameter T.

Filters functions annotated with the specified annotation class.

Filters properties annotated with annotation.

Link copied to clipboard

Filters classes that are assignable from type parameter T.

Filters classes that are assignable from the specified subType.

Link copied to clipboard

Filters classes that are assignable to type parameter T.

@JvmName(name = "areAssignableToKClasses")
infix fun ClassesThat.areAssignableTo(superTypes: List<KClass<*>>): ClassesRuleBuilder

Filters classes assignable to superTypes.

Filters classes that are assignable to the specified superType.

Link copied to clipboard

Filters classes that are assignable to all of the specified superTypes.

Link copied to clipboard

Filters classes that are assignable to any of the specified superTypes.

Link copied to clipboard

Filters classes that are not assignable from type parameter T.

Link copied to clipboard

Filters classes that are not assignable to type parameter T.

Link copied to clipboard

Asserts that all class declarations in the scope represent abstract classes or interfaces.

Asserts that all class declarations represent abstract classes or interfaces.

Link copied to clipboard
fun KontureScope.assertAreAssignableTo(vararg superTypes: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that all class declarations in the scope extend or implement any of the specified supertypes.

fun List<ClassDeclaration>.assertAreAssignableTo(vararg superTypes: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that all class declarations extend or implement any of the specified supertypes.

fun KontureScope.assertAreAssignableTo(first: KClass<*>, vararg additional: KClass<*>, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that classes in a KontureScope are assignable to first and additional supertypes.

fun List<ClassDeclaration>.assertAreAssignableTo(first: KClass<*>, vararg additional: KClass<*>, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that a list of class declarations are assignable to first and additional supertypes.

Link copied to clipboard
inline fun <T : Any> KontureScope.assertAreAssignableToType(vararg additional: KClass<*>, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that classes in a KontureScope are assignable to type parameter T.

inline fun <T : Any> List<ClassDeclaration>.assertAreAssignableToType(vararg additional: KClass<*>, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that a list of class declarations are assignable to type parameter T.

Link copied to clipboard

Asserts that all class declarations in the scope are data classes.

Asserts that all class declarations are data classes.

Link copied to clipboard

Asserts that all class declarations in the scope represent enum classes.

Asserts that all class declarations represent enum classes.

Link copied to clipboard

Asserts that all class declarations in the scope are inline/value classes.

Asserts that all class declarations are inline/value classes.

Link copied to clipboard

Asserts that all class declarations in the scope represent interfaces.

Asserts that all class declarations represent interfaces.

Link copied to clipboard

Asserts that all class declarations in the scope are internal.

Asserts that all class declarations are internal.

Link copied to clipboard

Asserts that all class declarations in the scope are private.

Asserts that all class declarations are private.

Link copied to clipboard

Asserts that all class declarations in the scope are protected.

Asserts that all class declarations are protected.

Link copied to clipboard

Asserts that all class declarations in the scope are public.

Asserts that all class declarations are public.

Link copied to clipboard

Asserts that all class declarations in the scope are sealed classes.

Asserts that all class declarations are sealed classes.

Link copied to clipboard

Asserts that file names in this scope match their primary class names.

Asserts that file names match their primary class names.

Link copied to clipboard
fun KontureFileScope.assertHasKDoc(additionalMessage: String? = null)

Asserts that files in this scope have KDoc documentation.

fun KontureFunctionScope.assertHasKDoc(additionalMessage: String? = null)

Asserts that all functions in this scope have KDoc documentation.

fun KontureScope.assertHasKDoc(additionalMessage: String? = null)

Asserts that all classes in this scope have KDoc documentation.

@JvmName(name = "assertClassesHasKDoc")
fun List<ClassDeclaration>.assertHasKDoc(additionalMessage: String? = null)

Asserts that all classes in this list have KDoc documentation.

@JvmName(name = "assertFilesHasKDoc")
fun List<FileDeclaration>.assertHasKDoc(additionalMessage: String? = null)

Asserts that files in this list have KDoc documentation.

Link copied to clipboard
fun KontureScope.assertHaveAnnotationOf(vararg annotationFqNames: String)

Asserts that all class declarations in the scope have at least one of the specified annotations. Matches either the annotation's simple name or its fully qualified name (FQN).

Asserts that classes in a KontureScope have the specified annotations.

fun List<ClassDeclaration>.assertHaveAnnotationOf(vararg annotationFqNames: String)

Asserts that all class declarations have at least one of the specified annotations. Matches either the annotation's simple name or its fully qualified name (FQN).

Asserts that a list of class declarations have the specified annotations.

Link copied to clipboard

Asserts that classes in a KontureScope have annotation type parameter T.

Asserts that a list of class declarations have annotation type parameter T.

Link copied to clipboard

Asserts that all class declarations in the scope have the specified visibility.

Asserts that all class declarations have the specified visibility.

Link copied to clipboard

Asserts that all file declarations in the scope have names ending with any of the specified suffixes.

Asserts that all class declarations in the scope have names ending with any of the specified suffixes.

Asserts that all class declarations have names ending with any of the specified suffixes.

Asserts that all file declarations have names ending with any of the specified suffixes.

Link copied to clipboard

Asserts that all file declarations in the scope have names matching any of the specified glob patterns.

fun KontureScope.assertNameMatching(vararg patterns: String)

Asserts that all class declarations in the scope have names matching any of the specified glob patterns. Supports '*' wildcards.

Asserts that all class declarations have names matching any of the specified glob patterns. Supports '*' wildcards.

Asserts that all file declarations have names matching any of the specified glob patterns.

Link copied to clipboard

Asserts that all file declarations in the scope have names starting with any of the specified prefixes.

Asserts that all class declarations in the scope have names starting with any of the specified prefixes.

Asserts that all class declarations have names starting with any of the specified prefixes.

Asserts that all file declarations have names starting with any of the specified prefixes.

Link copied to clipboard
fun Konture.assertNoCycles(includeTestConfigurations: Boolean)

Verifies that there are no module dependency cycles in the project. Throws an AssertionError if a cycle is detected.

Link copied to clipboard
fun KontureScope.assertNotBeAccessedByAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes in the scope are not accessed by any class residing in packages matching the specified patterns.

fun List<ClassDeclaration>.assertNotBeAccessedByAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes are not accessed by any class residing in packages matching the specified patterns.

Link copied to clipboard
fun KontureScope.assertNotDependOnClassesInAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes in the scope do not depend on classes residing in packages matching the specified patterns.

fun List<ClassDeclaration>.assertNotDependOnClassesInAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes do not depend on classes residing in packages matching the specified patterns.

Link copied to clipboard
fun KontureFileScope.assertNotResideInAModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph)

Filter or assertion criteria for assert not reside in a module.

fun List<FileDeclaration>.assertNotResideInAModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph)

Filter or assertion criteria for list.

Link copied to clipboard
fun KontureFileScope.assertNoWildcardImports(additionalMessage: String? = null)

Asserts that no file in this scope contains wildcard imports.

fun List<FileDeclaration>.assertNoWildcardImports(additionalMessage: String? = null)

Asserts that no file in this list contains wildcard imports.

Link copied to clipboard
fun KontureScope.assertOnlyBeAccessedByAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes in the scope are only accessed by classes residing in packages matching the specified patterns.

fun List<ClassDeclaration>.assertOnlyBeAccessedByAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes are only accessed by classes residing in packages matching the specified patterns.

Link copied to clipboard
fun KontureScope.assertOnlyDependOnClassesInAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes in the scope depend only on classes residing in packages matching the specified patterns.

fun List<ClassDeclaration>.assertOnlyDependOnClassesInAnyPackage(vararg packagePatterns: String, allClasses: List<ClassDeclaration> = Konture.projectGraph.getAllModules().flatMap { it.classes })

Asserts that the selected classes depend only on classes residing in packages matching the specified patterns.

Link copied to clipboard
fun KontureFileScope.assertOnlyOneClassPerFile(additionalMessage: String? = null)

Asserts that files in this scope contain at most one class.

fun List<FileDeclaration>.assertOnlyOneClassPerFile(additionalMessage: String? = null)

Asserts that files in this list contain at most one class.

Link copied to clipboard
fun KontureFileScope.assertResideInAModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph)

Filter or assertion criteria for assert reside in a module.

fun List<FileDeclaration>.assertResideInAModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph)

Filter or assertion criteria for list.

Link copied to clipboard
fun KontureFileScope.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all file declarations in the scope reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

fun KontureScope.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all class declarations in the scope reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

fun List<ClassDeclaration>.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all class declarations reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

fun List<FileDeclaration>.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all file declarations reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

Link copied to clipboard
fun KontureFileScope.assertTrue(additionalMessage: String? = null, predicate: (FileDeclaration) -> Boolean)

Asserts that all files in this scope satisfy predicate.

fun KontureFunctionScope.assertTrue(additionalMessage: String? = null, predicate: (FunctionDeclarationContext) -> Boolean)

Asserts that all functions in this scope satisfy the given predicate.

fun KonturePropertyScope.assertTrue(additionalMessage: String? = null, predicate: (PropertyDeclarationContext) -> Boolean)

Asserts that all properties in this scope satisfy the given predicate.

fun KontureScope.assertTrue(additionalMessage: String? = null, predicate: (ClassDeclaration) -> Boolean)

Asserts that all classes in this scope satisfy predicate.

@JvmName(name = "assertClassesTrue")
fun List<ClassDeclaration>.assertTrue(additionalMessage: String? = null, predicate: (ClassDeclaration) -> Boolean)

Asserts that all classes in this list satisfy predicate.

@JvmName(name = "assertFilesTrue")
fun List<FileDeclaration>.assertTrue(additionalMessage: String? = null, predicate: (FileDeclaration) -> Boolean)

Asserts that all files in this list satisfy predicate.

Link copied to clipboard

Asserts that functions are annotated with the annotation specified by type parameter T.

Asserts that properties are annotated with annotation type parameter T.

Asserts that functions are annotated with the specified annotation class.

Asserts that properties are annotated with annotation.

Link copied to clipboard

Asserts that classes are assignable from type parameter T.

Asserts that classes are assignable from the specified subType.

Link copied to clipboard

Asserts that classes are assignable to type parameter T.

Asserts that classes are assignable to the specified superType.

Link copied to clipboard

Asserts that classes are assignable to all of the specified superTypes.

Link copied to clipboard

Asserts that classes are assignable to any of the specified superTypes.

Link copied to clipboard

Access the class-level declarative assertion rule builder. Allows filtering and assertion of class structure, modifiers, annotations, visibility, and dependencies.

Filters classes in this scope to normal classes.

Filters the list of class declarations to include only normal classes (excluding interface definitions).

Filter or assertion criteria for classes.

Define and run class dependency/structural rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Filter or assertion criteria for class scope.

Link copied to clipboard

Filter or assertion criteria for class scope from module.

Link copied to clipboard

Synonym for scopeFromPackage retrieving a class-level functional KontureScope.

Synonym for scopeFromPackage retrieving a class-level functional KontureScope with source set filter.

Link copied to clipboard

Asserts that modules contain the class specified by type parameter T.

Filters modules containing the class specified by type parameter T.

Link copied to clipboard

Asserts that modules contain classes annotated with annotation type parameter T.

Filters modules containing classes annotated with annotation type parameter T.

Asserts that slices contain classes with annotation type parameter T.

Link copied to clipboard

Filters files in this scope to include only those containing class fqName.

Filters files in this scope to include only those containing class type.

Link copied to clipboard

Helper extension to check if a file contains a class matching the predicate.

Link copied to clipboard

Filters classes in this scope to data classes.

Filters class declarations to data classes.

Link copied to clipboard
fun List<Module>.dependingOnModule(targetModulePath: String): List<Module>

Filters modules that depend on targetModulePath.

Link copied to clipboard

Asserts that functions depend on package of T.

Filters functions depending on package of T.

Asserts that properties depend on package of T.

Filters properties depending on package of T.

Link copied to clipboard

Filters functions in this scope to include only extension functions.

Filters the list of functions to include only extension functions.

Link copied to clipboard

Filters properties in this scope to include only extension properties.

Filters the list of properties to include only extension properties.

Link copied to clipboard

Access the file-level declarative assertion rule builder. Allows filtering and assertion of source files and their imports, package, or wildcard usages.

fun Konture.files(sourceSets: SourceSetSelector, block: FilesRuleBuilder.() -> Unit)

Filter or assertion criteria for files.

Define and run source file dependency/structural rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Filter or assertion criteria for file scope.

Link copied to clipboard

Retrieves a file-level functional KontureFileScope scoped to a specific module path.

Filter or assertion criteria for file scope from module.

Link copied to clipboard

Retrieves a file-level functional KontureFileScope scoped to a specific package name.

Filter or assertion criteria for file scope from package.

Link copied to clipboard

Obtains a file scope containing files in the package of type parameter T.

Obtains a file scope containing files in the package of type.

Link copied to clipboard

Access the function-level declarative assertion rule builder. Allows filtering and assertion of function declarations (both top-level and nested member functions).

Filter or assertion criteria for functions.

Define and run function dependency/structural rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Filter or assertion criteria for function scope.

Link copied to clipboard

Retrieves a function-level functional KontureFunctionScope scoped to a specific module path.

Retrieves a function-level functional KontureFunctionScope scoped to a specific module path and source set.

Link copied to clipboard

Retrieves a function-level functional KontureFunctionScope scoped to a specific package name.

Retrieves a function-level functional KontureFunctionScope scoped to a specific package name and source set.

Link copied to clipboard

Obtains a function scope containing functions in the package of type parameter T.

Obtains a function scope containing functions in the package of type.

Link copied to clipboard

Helper extension to check if a class is annotated with all of the specified annotations.

Helper extension to check if a function has all of the specified annotations.

Helper extension to check if a property has all of the specified annotations.

Link copied to clipboard

Helper extension to check if a class is annotated with the given annotation.

Helper extension to check if a function has the specified annotation.

Helper extension to check if a property has the specified annotation.

Link copied to clipboard

Helper extension to check if a class is annotated with any of the specified annotations.

Helper extension to check if a function has any of the specified annotations.

Helper extension to check if a property has any of the specified annotations.

Link copied to clipboard

Helper extension to check if a file imports the specified match.

Link copied to clipboard

Helper extension to check if a file imports any match containing target segments.

Link copied to clipboard

Asserts that functions have all of the specified annotations.

Filters functions having all of the specified annotations.

Asserts that properties have all of the specified annotations.

Filters properties having all of the specified annotations.

Link copied to clipboard

Filters functions having annotation specified by annotation type parameter T.

Filters properties having annotation specified by annotation type parameter T.

Asserts that functions in this assertion scope have the specified annotation class.

Asserts that functions have the specified annotation class.

Filters functions having the specified annotation class.

Asserts that properties have the specified annotation class.

Filters properties having the specified annotation class.

Asserts that properties in this assertion scope have the specified annotation class.

Link copied to clipboard

Asserts that functions in this assertion scope have the annotation specified by T.

Asserts that functions have the annotation type parameter T.

Filters functions having the annotation type parameter T.

Asserts that properties have annotation type parameter T.

Filters properties having annotation type parameter T.

Asserts that properties in this assertion scope have the annotation specified by T.

Link copied to clipboard

Asserts that classes have an annotation annotation with argument argName equal to argValue.

Filters classes having an annotation annotation with argument argName equal to argValue.

Asserts that functions have an annotation annotation with an argument argName equal to argValue.

Filters functions having an annotation annotation with an argument argName equal to argValue.

Asserts that properties have an annotation annotation with argument argName equal to argValue.

Filters properties having an annotation annotation with argument argName equal to argValue.

Link copied to clipboard

Asserts that functions have any of the specified annotations.

Filters functions having any of the specified annotations.

Asserts that properties have any of the specified annotations.

Filters properties having any of the specified annotations.

Link copied to clipboard

Asserts that selected functions have a parameter of raw type T.

Link copied to clipboard

Asserts that properties have an import of type parameter T.

Filters properties that have an import of type parameter T.

Link copied to clipboard

Filter or assertion criteria for have name ending with.

Filters functions in this scope ending with suffix.

Filters properties in this scope ending with suffix.

Filters classes in this scope ending with suffix.

Filters the list of class declarations to include only those whose names end with the specified suffix.

@JvmName(name = "haveFileNameEndingWith")
fun List<FileDeclaration>.haveNameEndingWith(suffix: String): List<FileDeclaration>

Filters the list of file declarations to include only those whose names end with the specified suffix.

Filters the list of functions to include only those whose names end with suffix.

Filters the list of properties to include only those whose names end with suffix.

Link copied to clipboard

Filter or assertion criteria for have name starting with.

Filters functions in this scope starting with prefix.

Filters properties in this scope starting with prefix.

Filters classes in this scope starting with prefix.

Filters the list of class declarations to include only those whose names start with the specified prefix.

@JvmName(name = "haveFileNameStartingWith")
fun List<FileDeclaration>.haveNameStartingWith(prefix: String): List<FileDeclaration>

Filters the list of file declarations to include only those whose names start with the specified prefix.

Filters the list of functions to include only those whose names start with prefix.

Filters the list of properties to include only those whose names start with prefix.

Link copied to clipboard
@JvmName(name = "haveParameterOfKClasses")
infix fun FunctionsThat.haveParameterOf(types: List<KClass<*>>): FunctionsRuleBuilder

Filters functions having parameters of the specified types.

Link copied to clipboard

Filters functions having return type specified by type parameter T.

Asserts that functions in this assertion scope have the specified return type.

Link copied to clipboard

Asserts that functions in this assertion scope have the return type specified by T.

Asserts that selected functions have the specified raw return type.

Link copied to clipboard

Asserts that properties in this assertion scope have the specified type type.

Link copied to clipboard

Asserts that properties have type specified by type parameter T.

Asserts that properties in this assertion scope have the type specified by T.

Link copied to clipboard

Filters classes in this scope to inline/value classes.

Filters class declarations to inline/value classes.

Link copied to clipboard

Filters this file selector to include files residing in packages matching the specified pattern.

Filters this function selector to include functions residing in packages matching the specified pattern.

Filters this module selector to include modules residing in packages matching the specified pattern.

Filters this property selector to include properties residing in packages matching the specified pattern.

Filters this class selector to include classes residing in packages matching the specified pattern.

Link copied to clipboard

Asserts that classes reside in the package of type parameter T.

Filters classes residing in the package of type parameter T.

Asserts that files are in the package of the type parameter T.

Filters files in the package of the type parameter T.

Asserts that classes reside in the package of type.

Filters classes residing in the package of type.

Asserts that files are in the package of the specified type.

Filters files in the package of the specified type.

Link copied to clipboard

Filters classes in this scope to interfaces.

Filters the list of class declarations to include only interface definitions.

Link copied to clipboard

Filters classes in this scope to internal classes.

Filters class declarations to internal classes.

Link copied to clipboard
fun SourceUsage.isEnclosedInClass(classFqName: String, className: String? = null): Boolean

Returns true if this usage is enclosed in the class specified by classFqName and optional className.

Link copied to clipboard
fun SourceUsage.isEnclosedInProperty(propertyName: String, classFqName: String? = null, className: String? = null): Boolean

Returns true if this usage is enclosed in the property specified by propertyName and optional class contexts.

Link copied to clipboard

Define and run a nested, type-safe layered architecture specification. Automatically checks the layered rules at the end of the block.

Link copied to clipboard

Access the layered-architecture rule builder. Allows defining high-level layers and declaring directional access constraints between them.

Link copied to clipboard

Filters functions in this scope to include only member/class functions.

Filters the list of functions to include only member/class functions.

Link copied to clipboard

Filters properties in this scope to include only member/class properties.

Filters the list of properties to include only member/class properties.

Link copied to clipboard

Filter or assertion criteria for minus.

Subtracts the functions present in other from this KontureFunctionScope.

Removes modules present in other scope from this scope by path.

Subtracts the properties present in other from this KonturePropertyScope.

Subtracts classes present in other scope from this scope.

Removes slices present in other scope from this scope by key.

Link copied to clipboard

Access the modules-level declarative assertion rule builder. Allows filtering and assertion of architectural module structures and dependencies.

Filter or assertion criteria for modules.

Define and run module dependency rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Filter or assertion criteria for module scope.

Link copied to clipboard

Retrieves a module-level functional KontureModuleScope scoped to a specific module path or pattern.

Filter or assertion criteria for module scope from module.

Link copied to clipboard

Fails for every invocation of type T in the selected class.

Asserts that files do not call members of type parameter T.

Fails when the selected function invokes T.

Asserts that modules do not call members of type parameter T.

Asserts that properties do not call members of type parameter T.

Asserts that slices do not call members of type parameter T.

Link copied to clipboard

Filters files that do not contain a class matching type parameter T.

Asserts that modules do not contain the class specified by type parameter T.

Filters modules that do not contain the class specified by type parameter T.

Asserts that slices do not contain the class specified by type parameter T.

Link copied to clipboard

Filters files that do not contain classes annotated with annotation type parameter T.

Asserts that modules do not contain classes annotated with annotation type parameter T.

Filters modules that do not contain classes annotated with annotation type parameter T.

Asserts that slices do not contain classes annotated with annotation type parameter T.

Link copied to clipboard

Asserts that classes do not depend on class type parameter T.

Link copied to clipboard

Asserts that functions do not depend on package of T.

Filters functions not depending on package of T.

Asserts that properties do not depend on package of T.

Filters properties not depending on package of T.

Filters functions not depending on package of type.

Filters properties not depending on package of type.

Link copied to clipboard

Filters files that do not have an import of the type parameter T.

Asserts that properties do not have an import of type parameter T.

Filters properties that do not have an import of type parameter T.

Link copied to clipboard

Filters functions that do not have a parameter of type specified by type parameter T.

Link copied to clipboard

Filters functions that do not have return type specified by type parameter T.

Link copied to clipboard

Fails for every actual class/type use of type T in the selected class; imports alone do not match.

Asserts that files do not reference class type parameter T.

Fails for every actual class/type use of T in the selected function.

Asserts that modules do not reference class type parameter T.

Asserts that properties do not reference class type parameter T.

Asserts that slices do not reference class type parameter T.

Link copied to clipboard

Asserts that functions only depend on package of T.

Asserts that properties only depend on package of T.

Link copied to clipboard

Filter or assertion criteria for plus.

Combines two KontureFunctionScope scopes into a single unified scope.

Combines two module scopes into a new scope containing distinct modules by path.

Combines two KonturePropertyScope scopes into a single unified scope.

Combines two KontureScope instances into a new scope containing classes from both.

Combines two slice scopes into a new scope containing distinct slices by key.

Link copied to clipboard

Filters classes in this scope to private classes.

Filters class declarations to private classes.

Link copied to clipboard

Access the property-level declarative assertion rule builder. Allows filtering and assertion of property declarations (both top-level and class properties).

Filter or assertion criteria for properties.

Define and run property dependency/structural rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Filter or assertion criteria for property scope.

Link copied to clipboard

Retrieves a property-level functional KonturePropertyScope scoped to a specific module path.

Retrieves a property-level functional KonturePropertyScope scoped to a specific module path and source set.

Link copied to clipboard

Retrieves a property-level functional KonturePropertyScope scoped to a specific package name.

Retrieves a property-level functional KonturePropertyScope scoped to a specific package name and source set.

Link copied to clipboard

Obtains a property scope containing properties in the package of type parameter T.

Obtains a property scope containing properties in the package of type.

Link copied to clipboard

Filters classes in this scope to protected classes.

Filters class declarations to protected classes.

Link copied to clipboard

Filters classes in this scope to public classes.

Filters class declarations to public classes.

Link copied to clipboard

Filter or assertion criteria for reside in a package.

Filters functions in this scope residing in packages matching packagePattern.

Filters properties in this scope residing in packages matching packagePattern.

Filters classes in this scope residing in packages matching packagePattern.

Filters the list of class declarations to include only those residing in packages matching the specified pattern. Supports '..' segment wildcards.

@JvmName(name = "resideInFileAPackage")
fun List<FileDeclaration>.resideInAPackage(packagePattern: String): List<FileDeclaration>

Filters the list of file declarations to include only those residing in packages matching the specified pattern. Supports '..' wildcards.

Filters the list of functions to include only those residing in packages matching packagePattern.

Filters the list of properties to include only those residing in packages matching packagePattern.

Link copied to clipboard

Asserts that functions reside in the package of the type parameter T.

Filters functions residing in the package of the type parameter T.

Asserts that properties reside in the package of type parameter T.

Filters properties residing in the package of type parameter T.

Asserts that functions reside in the package of the specified type.

Filters functions residing in the package of the specified type.

Asserts that properties reside in the package of type.

Filters properties residing in the package of type.

Link copied to clipboard

Filters files residing in a module matching modulePath.

Filters functions residing in a module matching modulePath.

Filters properties residing in a module matching modulePath.

Link copied to clipboard

Filters files residing in a package matching packagePattern.

Filters functions residing in a package matching packagePattern.

Filters properties residing in a package matching packagePattern.

Link copied to clipboard
fun rule(id: String, block: RuleBuilder.() -> Unit): RuleDefinition

Top-level builder function for defining a named architecture rule with metadata and assertions.

Link copied to clipboard

Filter or assertion criteria for scope.

Link copied to clipboard

Retrieves a class-level functional KontureScope scoped to a specific module path.

Filter or assertion criteria for scope from module.

Link copied to clipboard

Retrieves a class-level functional KontureScope scoped to a specific package name.

Retrieves a class-level functional KontureScope scoped to a specific package name and source set.

Link copied to clipboard

Obtains a scope containing all files and declarations in the package of type parameter T.

Obtains a scope containing all files and declarations in the package of type.

Link copied to clipboard

Filters classes in this scope to sealed classes.

Filters class declarations to sealed classes.

Link copied to clipboard

Returns a fluent assertion scope for sequential assertions on this FileSelector.

Returns a fluent assertion scope for sequential assertions on this FunctionSelector.

Returns a fluent assertion scope for sequential assertions on this ModuleSelector.

Returns a fluent assertion scope for sequential assertions on this PropertySelector.

Returns a fluent assertion scope for sequential assertions on this ClassSelector.

Returns a fluent assertion scope for sequential assertions on this SliceSelector.

Asserts rules on filtered classes using a lambda block that provides a ClassDeclarationShouldContext receiver.

Asserts rules on filtered files using a lambda block that provides a FileDeclarationShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.

Asserts rules on filtered functions using a lambda block that provides a FunctionDeclarationShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.

Asserts rules on filtered modules using a lambda block that provides a ModuleShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.

Asserts rules on filtered properties using a lambda block that provides a PropertyDeclarationShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.

Asserts rules on slices using a lambda block that provides a SliceShouldContext receiver.

Link copied to clipboard

Access the slice declarative assertion rule builder. Groups packages into slices by a capture-group pattern and asserts relationships between them, such as cycle-freedom.

fun Konture.slices(sourceSets: SourceSetSelector, block: SlicesRuleBuilder.() -> Unit)

Filter or assertion criteria for slices.

Define and run slice rules inside a block-based DSL context. Automatically checks the rules at the end of the block.

Link copied to clipboard

Retrieves a slice-level functional KontureSliceScope derived from a package pattern.

Filter or assertion criteria for slice scope.

Link copied to clipboard

Retrieves a slice-level functional KontureSliceScope derived from a module pattern.

Retrieves a slice-level functional KontureSliceScope derived from a module pattern and source set.

Link copied to clipboard

Retrieves a slice-level functional KontureSliceScope derived from a package pattern.

Retrieves a slice-level functional KontureSliceScope derived from a package pattern and source set.

Link copied to clipboard

Filters classes in this rule using a concise lambda predicate evaluated on each ClassDeclaration.

Filters files in this rule using a concise lambda predicate evaluated on each FileDeclarationContext.

Filters functions in this rule using a concise lambda predicate evaluated on each FunctionDeclarationContext.

Filters modules in this rule using a concise lambda predicate evaluated on each Module.

Filters properties in this rule using a concise lambda predicate evaluated on each PropertyDeclarationContext.

Filters slices in this rule using a concise lambda predicate evaluated on each Slice.

Link copied to clipboard

Filters functions in this scope to include only top-level functions.

Filters the list of functions to include only top-level functions.

Link copied to clipboard

Filters properties in this scope to include only top-level properties.

Filters the list of properties to include only top-level properties.

Link copied to clipboard

Converts this SourceSet to a SourceSetId for the specified modulePath.

Link copied to clipboard

Filters properties in this scope to include only read-only (val) properties.

Filters the list of properties to include only read-only (val) properties.

Link copied to clipboard

Filters properties in this scope to include only mutable (var) properties.

Filters the list of properties to include only mutable (var) properties.

Link copied to clipboard

Filters classes in a KontureScope returning those with annotation type parameter T.

Filters a list of class declarations returning those with annotation type parameter T.

Filters functions in this scope to include only those with annotation annotationName.

Filters classes in this scope with annotation annotationFqName.

Filters classes in a KontureScope returning those with annotation annotation.

Filters the list of class declarations to include only those annotated with the specified annotation.

Filters a list of class declarations returning those with annotation annotation.

Link copied to clipboard

Filters files in this scope to include only those with import matching importPath.

Filters files in this scope to include only those with import of class type.

Link copied to clipboard

Filters classes in this scope with modifier.

Filters class declarations to those containing the specified modifier.

Link copied to clipboard

Filters functions in this scope to include only those residing in module modulePath.

Filters properties in this scope to include only those residing in module modulePath.

Filters the list of functions to include only those residing in module modulePath.

Filters the list of properties to include only those residing in module modulePath.

fun KontureFileScope.withModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph): KontureFileScope

Filter or assertion criteria for with module.

fun KontureScope.withModule(modulePath: String, graph: ProjectGraph = Konture.projectGraph): KontureScope

Filters classes in this scope residing in module modulePath.

Link copied to clipboard

Filters this file selector to include files whose names match the specified pattern.

Filters this function selector to include functions whose names match the specified pattern.

Filters this module selector to include modules whose path matches the specified pattern.

Filters this property selector to include properties whose names match the specified pattern.

Filters this class selector to include classes whose simple names match the specified pattern.

Filters this slice selector to include slices whose names match the specified pattern.

Link copied to clipboard

Filter or assertion criteria for with name matching.

Filters functions in this scope matching glob pattern pattern.

Filters properties in this scope matching glob pattern pattern.

Filters classes in this scope matching name pattern pattern.

Filters the list of class declarations to include only those whose simple names match the specified glob pattern. Supports '*' wildcards.

@JvmName(name = "withFileNameMatching")
fun List<FileDeclaration>.withNameMatching(pattern: String): List<FileDeclaration>

Filters the list of file declarations to include only those whose names match the specified glob pattern. Supports '*' wildcards.

Filters the list of functions to include only those matching the glob pattern pattern.

Filters the list of properties to include only those matching the glob pattern pattern.

Link copied to clipboard

Filters classes in a KontureScope returning those without annotation type parameter T.

Filters a list of class declarations returning those without annotation type parameter T.

Filters classes in this scope without annotation annotationFqName.

Filters classes in a KontureScope returning those without annotation annotation.

Filters the list of class declarations to exclude those annotated with the specified annotation.

Filters a list of class declarations returning those without annotation annotation.

Link copied to clipboard

Filters functions in this scope to include only those with parameter of type paramType.

Link copied to clipboard

Filters classes in a KontureScope returning those with parent type parameter T.

Filters a list of class declarations returning those extending or implementing type parameter T.

Filters classes in this scope with parent fqName.

Filters classes in a KontureScope returning those with parent type.

Filters class declarations to those extending or implementing the specified parent type.

Filters a list of class declarations returning those extending or implementing type.

Link copied to clipboard

Filters functions in this scope to include only those with return type returnType.

Link copied to clipboard

Filters functions in this scope to include only those with visibility visibility.

Filters classes in this scope with visibility.

Filters class declarations to those matching the specified visibility.