Stay organized with collections
Save and categorize content based on your preferences.
AndroidSourceFile
@Incubating interface AndroidSourceFile : Named
An AndroidSourceFile represents a single file input for an Android project.
Summary
Public methods
|
abstract String |
A concise name for the source directory (typically used to identify it in a collection).
|
abstract Any |
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.
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@Incubating interface AndroidSourceFile : Named\n```\n\n|--------------------------------------------------|\n| [com.android.build.api.dsl.AndroidSourceFile](#) |\n\nAn AndroidSourceFile represents a single file input for an Android project.\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](#getName())`()` A concise name for the source directory (typically used to identify it in a collection). |\n| abstract [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcFile](#srcFile(kotlin.Any))`(`srcPath:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Sets the location of the file. |\n\nPublic methods\n--------------\n\n### getName\n\n```\nabstract fun getName(): String\n```\n\nA concise name for the source directory (typically used to identify it in a collection). \n\n### srcFile\n\n```\nabstract fun 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(java.lang.Object)) This method has a return value for legacy reasons. |"]]