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 |
@Incubating String |
A concise name for the source directory (typically used to identify it in a collection).
|
@Incubating Any |
Sets the location of the file.
|
Public functions
getName
@Incubating
fun getName(): String
A concise name for the source directory (typically used to identify it in a collection).
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| `@`[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](/reference/tools/gradle-api/7.3/com/android/build/api/dsl/AndroidSourceFile#getName())`()` A concise name for the source directory (typically used to identify it in a collection). |\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcFile](/reference/tools/gradle-api/7.3/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```\n@Incubating\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```\n@Incubating\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. |"]]