Stay organized with collections
Save and categorize content based on your preferences.
AndroidSourceFile
interface AndroidSourceFile : Named
An AndroidSourceFile represents a single file input for an Android project.
Summary
Public functions |
String |
A concise name for the source directory (typically used to identify it in a collection).
|
Any |
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AndroidSourceFile\n=================\n\n\n```\ninterface AndroidSourceFile : Named\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn AndroidSourceFile represents a single file input for an Android project.\n\nSummary\n-------\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidSourceFile#getName())`()` A concise name for the source directory (typically used to identify it in a collection). |\n| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcFile](/reference/tools/gradle-api/8.0/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. |\n\nPublic functions\n----------------\n\n### getName\n\n```\nfun getName(): String\n```\n\nA concise name for the source directory (typically used to identify it in a collection). \n\n### srcFile\n\n```\nfun srcFile(srcPath: Any): Any\n```\n\nSets the location of the file. \n\n| Parameters ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |"]]