# AndroidSourceSet

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


```
interface AndroidSourceSet : Named
```

<br />

Known direct subclasses [AndroidLibrarySourceSet](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidLibrarySourceSet)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidLibrarySourceSet` |   |

*** ** * ** ***

An AndroidSourceSet represents a logical group of Java, aidl and RenderScript sources as well as Android and non-Android (Java-style) resources.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#aidl(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android AIDL source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#assets(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android Assets directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#baselineProfiles(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android Baseline Profiles source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#getName()()` Returns the name of this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#java(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Java source for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#jniLibs(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android JNI libs directory for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#keepRules(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The KeepRules R8 source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#kotlin(org.gradle.api.Action)(action: https://docs.gradle.org/current/javadoc/org/gradle/api/Action.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet>)` The Kotlin source for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#manifest(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceFile.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android Manifest file for this source-set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#mlModels(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The machine learning models directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#renderscript(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android RenderScript source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#res(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android Resources directory for this source-set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#resources(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Java-style resources for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#setRoot(kotlin.String)(path: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets the root of the source sets to a given path. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#shaders(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` The Android shaders directory for this source set. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#aidl()` The Android AIDL source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#annotationProcessorConfigurationName()` Returns the name of the annotation processing tool classpath for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#apiConfigurationName()` Returns the name of the api configuration for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#assets()` The Android Assets directory for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#baselineProfiles()` The Android Baseline Profiles source directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#compileOnlyApiConfigurationName()` Returns the name of the compileOnlyApi configuration for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#compileOnlyConfigurationName()` Returns the name of the compileOnly configuration for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#implementationConfigurationName()` Returns the name of the implementation configuration for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#java()` The Java source for this source-set |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#jniLibs()` The Android JNI libs directory for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#kaptConfigurationName()` Returns the name of the kapt annotation processing tool classpath for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#keepRules()` The KeepRules R8 source directory for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#kotlin()` The Kotlin source for this source-set |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceFile` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#manifest()` The Android Manifest file for this source-set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#mlModels()` The machine learning models directory for this source set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#name()` |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#renderscript()` The Android RenderScript source directory for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#res()` The Android Resources directory for this source-set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#resources()` The Java-style resources for this source-set |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#runtimeOnlyConfigurationName()` Returns the name of the implementation configuration for this source set. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceDirectorySet` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/AndroidSourceSet#shaders()` The Android shaders directory for this source set. |

## Public functions

### aidl

Added in 4.2.0

```
fun aidl(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android AIDL source directory for this source set.

### assets

Added in 4.2.0

```
fun assets(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android Assets directory for this source set.

### baselineProfiles

Added in 8.0.2

```
@Incubating
fun baselineProfiles(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android Baseline Profiles source directory for this source set.

### getName

```
fun getName(): String
```

Returns the name of this source set.

### java

Added in 4.2.0

```
fun java(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Java source for this source-set

### jniLibs

Added in 4.2.0

```
fun jniLibs(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android JNI libs directory for this source-set

### keepRules

Added in 9.6.0-alpha03

```
fun keepRules(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The KeepRules R8 source directory for this source set.

### kotlin

Added in 7.0.0

```
fun kotlin(action: Action<AndroidSourceDirectorySet>): Unit
```

The Kotlin source for this source-set

### manifest

Added in 4.2.0

```
fun manifest(action: AndroidSourceFile.() -> Unit): Unit
```

The Android Manifest file for this source-set.

### mlModels

Added in 4.2.0

```
fun mlModels(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The machine learning models directory for this source set.

### renderscript

Added in 4.2.0

```
fun renderscript(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android RenderScript source directory for this source set.

### res

Added in 4.2.0

```
fun res(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android Resources directory for this source-set.

### resources

Added in 4.2.0

```
fun resources(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Java-style resources for this source-set

### setRoot

Added in 4.2.0

```
fun setRoot(path: String): Any
```

Sets the root of the source sets to a given path.

All entries of the source-set are located under this root directory.

This method has a return value for legacy reasons.

| Parameters |
|---|---|
| `path: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the root directory path to use. |

### shaders

Added in 4.2.0

```
fun shaders(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

The Android shaders directory for this source set.

## Public properties

### aidl

Added in 4.2.0

```
val aidl: AndroidSourceDirectorySet
```

The Android AIDL source directory for this source set.

### annotationProcessorConfigurationName

Added in 4.2.0

```
val annotationProcessorConfigurationName: String
```

Returns the name of the annotation processing tool classpath for this source set.

### apiConfigurationName

Added in 4.2.0

```
val apiConfigurationName: String
```

Returns the name of the api configuration for this source set.

### assets

Added in 4.2.0

```
val assets: AndroidSourceDirectorySet
```

The Android Assets directory for this source set.

### baselineProfiles

Added in 8.0.2

```
val baselineProfiles: AndroidSourceDirectorySet
```

The Android Baseline Profiles source directory for this source set.

### compileOnlyApiConfigurationName

Added in 8.4.0

```
val compileOnlyApiConfigurationName: String
```

Returns the name of the compileOnlyApi configuration for this source set.

### compileOnlyConfigurationName

Added in 4.2.0

```
val compileOnlyConfigurationName: String
```

Returns the name of the compileOnly configuration for this source set.

### implementationConfigurationName

Added in 4.2.0

```
val implementationConfigurationName: String
```

Returns the name of the implementation configuration for this source set.

### java

Added in 4.2.0

```
val java: AndroidSourceDirectorySet
```

The Java source for this source-set

### jniLibs

Added in 4.2.0

```
val jniLibs: AndroidSourceDirectorySet
```

The Android JNI libs directory for this source-set

### kaptConfigurationName

Added in 8.7.0

```
val kaptConfigurationName: String
```

Returns the name of the kapt annotation processing tool classpath for this source set.

This configuration is only created when built-in KAPT support is enabled.

### keepRules

Added in 9.6.0-alpha03

```
val keepRules: AndroidSourceDirectorySet
```

The KeepRules R8 source directory for this source set.

### kotlin

Added in 7.0.0

```
val kotlin: AndroidSourceDirectorySet
```

The Kotlin source for this source-set

### manifest

Added in 4.2.0

```
val manifest: AndroidSourceFile
```

The Android Manifest file for this source-set.

### mlModels

Added in 4.2.0

```
val mlModels: AndroidSourceDirectorySet
```

The machine learning models directory for this source set.

### name

```
val name: String
```

### renderscript

Added in 4.2.0

```
val renderscript: AndroidSourceDirectorySet
```

The Android RenderScript source directory for this source set.

### res

Added in 4.2.0

```
val res: AndroidSourceDirectorySet
```

The Android Resources directory for this source-set.

### resources

Added in 4.2.0

```
val resources: AndroidSourceDirectorySet
```

The Java-style resources for this source-set

### runtimeOnlyConfigurationName

Added in 4.2.0

```
val runtimeOnlyConfigurationName: String
```

Returns the name of the implementation configuration for this source set.

### shaders

Added in 4.2.0

```
val shaders: AndroidSourceDirectorySet
```

The Android shaders directory for this source set.