# AndroidSourceSet

# AndroidSourceSet

<br />

```
interface AndroidSourceSet : Named
```

<br />

*** ** * ** ***

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                                                                                                                                                                                                                                                                                                                                                                           ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [aidl](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#aidl(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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.                         |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [assets](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#assets(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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.                          |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#getName())`()` Returns the name of this source set.                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [java](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#java(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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                                            |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)     | ~~[jni](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#jni(kotlin.Function1))~~`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceDirectorySet)`.() `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` **This function is deprecated.**Unused                                       |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [jniLibs](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#jniLibs(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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                       |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [kotlin](https://developer.android.com/reference/tools/gradle-api/7.3/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.3/com/android/build/api/dsl/AndroidSourceDirectorySet)`>)` The Java source for this source-set                                                                                                                                                              |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [manifest](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#manifest(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceFile](https://developer.android.com/reference/tools/gradle-api/7.3/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.                                         |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [mlModels](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#mlModels(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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.             |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [renderscript](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#renderscript(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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. |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [res](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#res(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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.                             |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [resources](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#resources(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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                         |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)       | [setRoot](https://developer.android.com/reference/tools/gradle-api/7.3/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.                                                                                                                                                                                                                                                                                                     |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                               | [shaders](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#shaders(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[AndroidSourceDirectorySet](https://developer.android.com/reference/tools/gradle-api/7.3/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.                       |

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

## Public functions

### aidl

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

The Android AIDL source directory for this source set.  

### assets

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

The Android Assets directory for this source set.  

### getName

```
@Incubating
fun getName(): String
```

Returns the name of this source set.  

### java

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

The Java source for this source-set  

### jni

```
@Incubating
fun [jni](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceSet#jni(kotlin.Function1))(action: @ExtensionFunctionType AndroidSourceDirectorySet.() -> Unit): Unit
```
| **This function is deprecated.**   
| Unused

The Android JNI source directory for this source set.  

### jniLibs

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

The Android JNI libs directory for this source-set  

### kotlin

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

The Java source for this source-set  

### manifest

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

The Android Manifest file for this source-set.  

### mlModels

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

The machine learning models directory for this source set.  

### renderscript

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

The Android RenderScript source directory for this source set.  

### res

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

The Android Resources directory for this source-set.  

### resources

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

The Java-style resources for this source-set  

### setRoot

```
@Incubating
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: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the root directory path to use. |

### shaders

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

The Android shaders directory for this source set.

## Public properties

### aidl

```
val aidl: AndroidSourceDirectorySet
```

The Android AIDL source directory for this source set.  

### annotationProcessorConfigurationName

```
val annotationProcessorConfigurationName: String
```

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

### apiConfigurationName

```
val apiConfigurationName: String
```

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

### assets

```
val assets: AndroidSourceDirectorySet
```

The Android Assets directory for this source set.  

### compileOnlyConfigurationName

```
val compileOnlyConfigurationName: String
```

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

### implementationConfigurationName

```
val implementationConfigurationName: String
```

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

### java

```
val java: AndroidSourceDirectorySet
```

The Java source for this source-set  

### jni

```
val jni: AndroidSourceDirectorySet
```
| **This property is deprecated.**   
| Unused

The Android JNI source directory for this source set.  

### jniLibs

```
val jniLibs: AndroidSourceDirectorySet
```

The Android JNI libs directory for this source-set  

### kotlin

```
val kotlin: AndroidSourceDirectorySet
```

The Kotlin source for this source-set  

### manifest

```
val manifest: AndroidSourceFile
```

The Android Manifest file for this source-set.  

### mlModels

```
val mlModels: AndroidSourceDirectorySet
```

The machine learning models directory for this source set.  

### renderscript

```
val renderscript: AndroidSourceDirectorySet
```

The Android RenderScript source directory for this source set.  

### res

```
val res: AndroidSourceDirectorySet
```

The Android Resources directory for this source-set.  

### resources

```
val resources: AndroidSourceDirectorySet
```

The Java-style resources for this source-set  

### runtimeOnlyConfigurationName

```
val runtimeOnlyConfigurationName: String
```

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

### shaders

```
val shaders: AndroidSourceDirectorySet
```

The Android shaders directory for this source set.  

### wearAppConfigurationName

```
val wearAppConfigurationName: String
```

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