# AndroidSourceFile

# AndroidSourceFile

```
@Incubating interface AndroidSourceFile : Named
```

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

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

## Summary

|                                                                                                                                                                     ### Public methods                                                                                                                                                                      ||
|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/AndroidSourceFile#getName())`()` A concise name for the source directory (typically used to identify it in a collection).                                        |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)       | [srcFile](https://developer.android.com/reference/tools/gradle-api/4.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 methods

### getName

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

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

### srcFile

```
abstract 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(java.lang.Object)) This method has a return value for legacy reasons. |