# KotlinMultiplatformAndroidCompilationBuilder

# KotlinMultiplatformAndroidCompilationBuilder

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/KotlinMultiplatformAndroidCompilationBuilder.kt+class:com.android.build.api.dsl.KotlinMultiplatformAndroidCompilationBuilder)  
Added in 8.2.0  

<br />

```
@Incubating
interface KotlinMultiplatformAndroidCompilationBuilder
```

<br />

*** ** * ** ***

Options to build a[KotlinMultiplatformAndroidCompilation](https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/dsl/KotlinMultiplatformAndroidCompilation)object.

## Summary

|                                ### Public properties                                |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)    | [compilationName](https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/dsl/KotlinMultiplatformAndroidCompilationBuilder#compilationName()) **This property is deprecated.**Changing the compilation name is discouraged.This API will be removed in AGP 9.0                                                    |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)    | [defaultSourceSetName](https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/dsl/KotlinMultiplatformAndroidCompilationBuilder#defaultSourceSetName()) **This property is deprecated.**Changing the name of the source set used as a default in a compilation is discouraged.This API will be removed in AGP 9.0 |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [sourceSetTreeName](https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/dsl/KotlinMultiplatformAndroidCompilationBuilder#sourceSetTreeName()) The name of the sourceSet tree that would be used to infer the dependencies between sourceSets.                                                                 |

## Public properties

### compilationName

Added in 8.2.0  
Deprecated in 8.8.2  

```
var compilationName: String
```
| **This property is deprecated.**   
| Changing the compilation name is discouraged.This API will be removed in AGP 9.0

The name of the compilation object. The name can be used later to access the compilation object using  

```kotlin
kotlin {
  androidLibrary {
    compilations.getByName("main") {
      // configure compilation
    }
  }
}
```  

|                                                                See also                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------|---|
| [KotlinCompilation](https://developer.android.com/reference/tools/gradle-api/8.8/org/jetbrains/kotlin/gradle/plugin/KotlinCompilation) |   |

### defaultSourceSetName

Added in 8.2.0  
Deprecated in 8.8.2  

```
var defaultSourceSetName: String
```
| **This property is deprecated.**   
| Changing the name of the source set used as a default in a compilation is discouraged.This API will be removed in AGP 9.0

The name of the sourceSet that is used in the compilation as the default sourceSet to compile. The sourceSet created will be located at`$projectDir/src/$sourceSetName`.

The sourceSet name can be used later to access the sourceSet object using  

```kotlin
kotlin {
  sourceSets.getByName("androidMain") {
    // configure sourceSet
  }
}
```  

|                                                              See also                                                              |
|------------------------------------------------------------------------------------------------------------------------------------|---|
| [KotlinSourceSet](https://developer.android.com/reference/tools/gradle-api/8.8/org/jetbrains/kotlin/gradle/plugin/KotlinSourceSet) |   |

### sourceSetTreeName

Added in 8.2.0  

```
var sourceSetTreeName: String?
```

The name of the sourceSet tree that would be used to infer the dependencies between sourceSets. For example, setting the sourceSetTreeName to`test`means that compilation will include the`commonTest`sourceSet, and setting it to`integrationTest`means that the compilation will include the`commonIntegrationTest`sourceSet if exists.

Setting this value to`null`means that this compilation is not part of any sourceSet trees and the kotlin plugin will not include any common test sourceSets in this compilation.  

|                                    See also                                    |
|--------------------------------------------------------------------------------|---|
| `org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.targetHierarchy` |   |