# AndroidSourceSet

# AndroidSourceSet

```
@Incubating interface AndroidSourceSet : Named
```

|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.dsl.AndroidSourceSet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#) |

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

## Summary

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

|                                                                                                                                                                                                               ### Properties                                                                                                                                                                                                                ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [aidl](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#aidl:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android AIDL source directory for this source set.                                                      |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [annotationProcessorConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#annotationProcessorConfigurationName:kotlin.String) Returns the name of the annotation processing tool classpath for this source set. |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [apiConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#apiConfigurationName:kotlin.String) Returns the name of the api configuration for this source set.                                                    |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [assets](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#assets:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android Assets directory for this source set.                                                       |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [compileOnlyConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#compileOnlyConfigurationName:kotlin.String) Returns the name of the compileOnly configuration for this source set.                            |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [implementationConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#implementationConfigurationName:kotlin.String) Returns the name of the implemenation configuration for this source set.                    |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [java](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#java:com.android.build.api.dsl.AndroidSourceDirectorySet) The Java source for this source-set                                                                         |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [jni](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#jni:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android JNI source directory for this source set.                                                         |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [jniLibs](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#jniLibs:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android JNI libs directory for this source-set                                                    |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [kotlin](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#kotlin:com.android.build.api.dsl.AndroidSourceDirectorySet) The Kotlin source for this source-set                                                                   |
| abstract[AndroidSourceFile](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceFile)                 | [manifest](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#manifest:com.android.build.api.dsl.AndroidSourceFile) The Android Manifest file for this source-set.                                                              |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [mlModels](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#mlModels:com.android.build.api.dsl.AndroidSourceDirectorySet) The machine learning models directory for this source set.                                          |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [renderscript](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#renderscript:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android RenderScript source directory for this source set.                              |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [res](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#res:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android Resources directory for this source-set.                                                          |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [resources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#resources:com.android.build.api.dsl.AndroidSourceDirectorySet) The Java-style resources for this source-set                                                      |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [runtimeOnlyConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#runtimeOnlyConfigurationName:kotlin.String) Returns the name of the implemenation configuration for this source set.                          |
| abstract[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceDirectorySet) | [shaders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#shaders:com.android.build.api.dsl.AndroidSourceDirectorySet) The Android shaders directory for this source set.                                                    |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                              | [wearAppConfigurationName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet#wearAppConfigurationName:kotlin.String) Returns the name of the wearApp configuration for this source set.                                        |

## Public methods

### aidl

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

The Android AIDL source directory for this source set.  

### assets

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

The Android Assets directory for this source set.  

### getName

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

Returns the name of this source set.  

### java

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

The Java source for this source-set  

### jni

```
abstract fun jni(action: AndroidSourceDirectorySet.() -> Unit): Unit
```

**Deprecated.**

The Android JNI source directory for this source set.  

### jniLibs

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

The Android JNI libs directory for this source-set  

### kotlin

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

The Java source for this source-set  

### manifest

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

The Android Manifest file for this source-set.  

### mlModels

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

The machine learning models directory for this source set.  

### renderscript

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

The Android RenderScript source directory for this source set.  

### res

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

The Android Resources directory for this source-set.  

### resources

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

The Java-style resources for this source-set  

### setRoot

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

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

All entries of the soure-setare located under this root directory.

This method has a return value for legacy reasons.

|                                                       Parameters                                                       ||
|---------------------------------------------------------------------------------------|---------------------------------|
| path:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the root directory path to use. |

### shaders

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

The Android shaders directory for this source set.

## Properties

### aidl

```
abstract val aidl: AndroidSourceDirectorySet
```

The Android AIDL source directory for this source set.  

### annotationProcessorConfigurationName

```
abstract val annotationProcessorConfigurationName: String
```

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

### apiConfigurationName

```
abstract val apiConfigurationName: String
```

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

### assets

```
abstract val assets: AndroidSourceDirectorySet
```

The Android Assets directory for this source set.  

### compileOnlyConfigurationName

```
abstract val compileOnlyConfigurationName: String
```

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

### implementationConfigurationName

```
abstract val implementationConfigurationName: String
```

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

### java

```
abstract val java: AndroidSourceDirectorySet
```

The Java source for this source-set  

### jni

```
abstract val jni: AndroidSourceDirectorySet
```

**Deprecated.**

The Android JNI source directory for this source set.  

### jniLibs

```
abstract val jniLibs: AndroidSourceDirectorySet
```

The Android JNI libs directory for this source-set  

### kotlin

```
abstract val kotlin: AndroidSourceDirectorySet
```

The Kotlin source for this source-set  

### manifest

```
abstract val manifest: AndroidSourceFile
```

The Android Manifest file for this source-set.  

### mlModels

```
abstract val mlModels: AndroidSourceDirectorySet
```

The machine learning models directory for this source set.  

### renderscript

```
abstract val renderscript: AndroidSourceDirectorySet
```

The Android RenderScript source directory for this source set.  

### res

```
abstract val res: AndroidSourceDirectorySet
```

The Android Resources directory for this source-set.  

### resources

```
abstract val resources: AndroidSourceDirectorySet
```

The Java-style resources for this source-set  

### runtimeOnlyConfigurationName

```
abstract val runtimeOnlyConfigurationName: String
```

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

### shaders

```
abstract val shaders: AndroidSourceDirectorySet
```

The Android shaders directory for this source set.  

### wearAppConfigurationName

```
abstract val wearAppConfigurationName: String
```

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