KotlinMultiplatformModule

mill.kotlinlib.multiplatform.KotlinMultiplatformModule

A Kotlin Multiplatform module, with one PlatformModule submodule per target platform, e.g.

object foo extends KotlinMultiplatformModule {
 def kotlinVersion = "2.2.20"

 object jvm extends PlatformModule {
   object test extends PlatformTests, TestModule.Junit4
 }
 object js extends PlatformModule, KotlinJsModule {
   object test extends PlatformTests, KotlinTestPackageTests
 }
}

Sources are laid out by source set, as in the Kotlin Gradle plugin: foo/src/commonMain/kotlin is shared by all platforms, foo/src/jvmMain/kotlin and foo/src/jsMain/kotlin are platform-specific, and foo/src/Test/kotlin hold the corresponding tests.

Requires Kotlin 2.0+ (the K2 compiler).

Attributes

Source
KotlinMultiplatformModule.scala
Graph
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Classlikes

A submodule compiling the source sets of one platform, e.g. jvmMain and commonMain. The compiler depends on the mixed-in traits, e.g. KotlinJsModule for Kotlin/JS.

A submodule compiling the source sets of one platform, e.g. jvmMain and commonMain. The compiler depends on the mixed-in traits, e.g. KotlinJsModule for Kotlin/JS.

Name it after its Kotlin target, e.g. object jvm reads jvmMain, or override kmpPlatform.

Attributes

Source
KotlinMultiplatformModule.scala
Supertypes
trait KotlinModule
trait JavaModule
trait RunModule
trait RunModuleApi
trait BspModule
trait BspModuleApi
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type

Inherited classlikes

object moduleInternal extends Internal

Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

Attributes

Inherited from:
Module
Source
Module.scala
Supertypes
class Internal
class Object
trait Matchable
class Any

Value members

Abstract methods

def kotlinVersion: Simple[String]

The Kotlin version used by all PlatformModules

The Kotlin version used by all PlatformModules

Attributes

Source
KotlinMultiplatformModule.scala

Concrete methods

def kmpSourceSetDir(sourceSet: String, language: String = ...): Path

Inherited methods

Attributes

Inherited from:
BaseClass
Source
Module.scala
def moduleDir: Path

Attributes

Inherited from:
Module
Source
Module.scala
override def moduleDirectChildren: Seq[Module]

Attributes

Definition Classes
Inherited from:
Module
Source
Module.scala
override def moduleSegments: Segments

Attributes

Definition Classes
Inherited from:
Module
Source
Module.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Module -> Any
Inherited from:
Module
Source
Module.scala