KotlinSourceSet

interface KotlinSourceSet : Named, HasProject, HasMutableExtras, HasKotlinDependencies

Represents a logical group of Kotlin files, including sources, resources and additional metadata describing how this group participates in the compilation of this project.

For example, here's a common way to access all available within Kotlin source sets:

kotlin.sourceSets.configureEach {
// Here you can configure all Kotlin source sets.
// For example, to add an additional source directory.
kotlin.srcDir(project.layout.buildDirectory.dir("generatedSources"))
}

See also

Types

Link copied to clipboard
object Companion

Constants for KotlinSourceSet.

Properties

Link copied to clipboard

The name of the Gradle Configuration that contains api dependencies.

Link copied to clipboard

The name of the Gradle Configuration containing compileOnly dependencies.

Link copied to clipboard

Contains a set of custom file extensions used to identify source files for this KotlinSourceSet.

Link copied to clipboard

Returns a set of source sets that have a dependsOn relationship with this source set.

Link copied to clipboard
abstract override val extras: MutableExtras
Link copied to clipboard

The name of the Gradle Configuration that contains implementation dependencies.

Link copied to clipboard

Represents a set of Kotlin source files that are included in this KotlinSourceSet.

Link copied to clipboard

Provides the DSL to configure a subset of Kotlin compilation language settings for this KotlinSourceSet.

Link copied to clipboard
abstract val project: Project

The Gradle Project associated with the entity.

Link copied to clipboard

Represents a set of resource files that are included in this KotlinSourceSet.

Link copied to clipboard

The name of the Gradle Configuration containing runtimeOnly dependencies.

Functions

Link copied to clipboard

Adds additional custom source file extensions for the KotlinSourceSet so that they are included as compilation inputs.

Link copied to clipboard
abstract fun dependencies(configure: KotlinDependencyHandler.() -> Unit)
abstract fun dependencies(configure: Action<KotlinDependencyHandler>)

Configures all dependencies for this entity.

Link copied to clipboard
abstract fun dependsOn(other: KotlinSourceSet)

Adds a Kotlin-specific relation to the other source set.

Link copied to clipboard
abstract fun getName(): String
Link copied to clipboard
abstract fun kotlin(configure: SourceDirectorySet.() -> Unit): SourceDirectorySet

Configures the SourceDirectorySet containing Kotlin source files with the provided configuration.

Link copied to clipboard

Configures the LanguageSettingsBuilder source set with the provided configuration.

Configures the LanguageSettingsBuilder in the source set with the provided configuration.