# AndroidSourceFile

# AndroidSourceFile


```
@Incubating interface AndroidSourceFile
```

<br />

*** ** * ** ***

An AndroidSourceFile represents a single file input for an Android project.

## Summary

|                                                                                                                                                                ### Public functions                                                                                                                                                                ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidSourceFile#getName())`()` A concise name for the source directory (typically used to identify it in a collection).                                       |
| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)       | [srcFile](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidSourceFile#srcFile(kotlin.Any))`(srcPath: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?)` Sets the location of the file. |

## Public functions

### getName

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

A concise name for the source directory (typically used to identify it in a collection).  

### srcFile

```
fun srcFile(srcPath: Any?): Any
```

Sets the location of the file.  

|                                                                                                                                                 Parameters                                                                                                                                                  ||
|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `srcPath: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?` | The source directory. This is evaluated as [org.gradle.api.Project.file](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#file-kotlin.Any-) This method has a return value for legacy reasons. |