Skip to content

KtSdkModuleBuilder

class KtSdkModuleBuilder(coreApplicationEnvironment: CoreApplicationEnvironment, project: Project) : KtLibraryModuleBuilder

Constructors

KtSdkModuleBuilder

constructor(coreApplicationEnvironment: CoreApplicationEnvironment, project: Project)

Properties

contentScope

var contentScope: GlobalSearchScope?

libraryName

lateinit var libraryName: String

libraryScopeConstructionMode

The StandaloneLibraryScopeConstructionMode used to build this module's content scope when contentScope is not set explicitly.

The option is a workaround for exceptional cases. See StandaloneLibraryScopeConstructionMode for more information.

The default construction mode is seeded from the owning provider's KaModuleContainerBuilder.libraryScopeConstructionMode and may be overridden here.

librarySources

platform

lateinit var platform: TargetPlatform

Functions

addBinaryRoot

fun addBinaryRoot(root: Path)

Adds a root to the current library.

The root can be:

  • A .jar file for JVM libraries or common metadata KLibs

  • A directory with a set of .classfiles for JVM Libraries

  • A Kotlin/Native, Kotlin/Common, Kotlin/JS KLib. In this case, all KLib dependencies should be provided together with the KLib itself.

addBinaryRoots

Adds a collection of roots to the current library.

See addBinaryRoot for details

See also

addBinaryRootsFromJdkHome

fun addBinaryRootsFromJdkHome(jdkHome: Path, isJre: Boolean)

addBinaryVirtualFile

fun addBinaryVirtualFile(virtualFile: VirtualFile)

addBinaryVirtualFiles

fun addBinaryVirtualFiles(virtualFiles: Collection<VirtualFile>)

addDependsOnDependency

addFriendDependency

addRegularDependency

build

open override fun build(): KaLibraryModule