Konsist

Represents the Konsist API. This is the main entry point to the Konsist library.

It allows to create a com.lemonappdev.konsist.api.container.koscope.KoScope instance from the given set of files such as all project files, single module, path etc.

Properties

Link copied to clipboard
open override val projectRootPath: String

Creates a path to the root project directory.

Functions

Link copied to clipboard
open override fun scopeFromDirectories(paths: Collection<String>): KoScope

Creates a KoScope containing all of Kotlin files in the given directories.

Link copied to clipboard
open override fun scopeFromDirectory(path: String, vararg paths: String): KoScope

Creates a KoScope containing all of Kotlin files in the given directory.

Link copied to clipboard
open override fun scopeFromExternalDirectories(absolutePaths: Collection<String>): KoScope

Creates a KoScope containing all of Kotlin files in the given directories. Some features (as KoFile.projectPath, KoFile.moduleName) do not work with this method.

Link copied to clipboard
open override fun scopeFromExternalDirectory(absolutePath: String, vararg paths: String): KoScope

Creates a KoScope containing all of Kotlin files in the given directory. Some features (as KoFile.projectPath, KoFile.moduleName) do not work with this method.

Link copied to clipboard
open override fun scopeFromFile(path: String, vararg paths: String): KoScope

Creates a KoScope of a given file.

Link copied to clipboard
open override fun scopeFromFiles(paths: Collection<String>): KoScope

Creates a KoScope of a given files.

Link copied to clipboard
open override fun scopeFromModule(moduleName: String, vararg moduleNames: String): KoScope

Creates a KoScope containing all of Kotlin files in the module. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromModules(moduleNames: Collection<String>): KoScope

Creates a KoScope containing all of Kotlin files in the module. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromPackage(packagee: String, moduleName: String?, sourceSetName: String?): KoScope

Creates a KoScope containing all of Kotlin files in the given package. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromProduction(moduleName: String?, sourceSetName: String?): KoScope

Creates a KoScope containing all of Kotlin files in the production source sets. The production source set is the source set which name does not start and ends with "test". Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromProject(moduleName: String?, sourceSetName: String?, ignoreBuildConfig: Boolean): KoScope

Creates a KoScope containing all of Kotlin files in the project. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromSourceSet(sourceSetName: String, vararg sourceSetNames: String): KoScope

Creates a KoScope containing all of Kotlin files in source set. If the source set is present in multiple modules then all of them will be included. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromSourceSets(sourceSetNames: Collection<String>): KoScope

Creates a KoScope containing all of Kotlin files in source set. If the source set is present in multiple modules then all of them will be included. Method does return Kotlin files present in build directories such as "build" and "target".

Link copied to clipboard
open override fun scopeFromTest(moduleName: String?, sourceSetName: String?): KoScope

Creates a KoScope containing all of Kotlin files in the test source sets. The test source set is the source set which name starts or ends with "test". Method does return Kotlin files present in build directories such as "build" and "target".