Stay organized with collections
Save and categorize content based on your preferences.
AndroidSourceDirectorySet
@Incubating interface AndroidSourceDirectorySet : Named
An AndroidSourceDirectorySet represents a set of directory inputs 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 source directories for this set.
|
abstract Any |
Adds the given source directory to this set.
|
abstract Any |
Adds the given source directories to this set.
|
Public methods
getName
abstract fun getName(): String
A concise name for the source directory (typically used to identify it in a collection).
setSrcDirs
abstract fun setSrcDirs(srcDirs: Iterable<*>): Any
Sets the source directories for this set.
srcDir
abstract fun srcDir(srcDir: Any): Any
Adds the given source directory to this set.
srcDirs
abstract fun srcDirs(vararg srcDirs: Any): Any
Adds the given source directories to this set.
Parameters |
vararg srcDirs: Any |
The source directories. These are evaluated as org.gradle.api.Project.files
This method has a return value for legacy reasons.
|
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AndroidSourceDirectorySet\n=========================\n\n```\n@Incubating interface AndroidSourceDirectorySet : Named\n```\n\n|----------------------------------------------------------|\n| [com.android.build.api.dsl.AndroidSourceDirectorySet](#) |\n\nAn AndroidSourceDirectorySet represents a set of directory inputs 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) | [setSrcDirs](#setSrcDirs(kotlin.collections.Iterable))`(`srcDirs:` `[Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)\u003c*\u003e`)` Sets the source directories for this set. |\n| abstract [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcDir](#srcDir(kotlin.Any))`(`srcDir:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds the given source directory to this set. |\n| abstract [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcDirs](#srcDirs(kotlin.Any))`(`vararg` `srcDirs:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds the given source directories to this set. |\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### setSrcDirs\n\n```\nabstract fun setSrcDirs(srcDirs: Iterable\u003c*\u003e): Any\n```\n\nSets the source directories for this set.\n\n| Parameters ||\n|-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| srcDirs: [Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)\\\u003c\\*\\\u003e | The source directories. These are evaluated as for [org.gradle.api.Project.files](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#files(java.lang.Object...)) This method has a return value for legacy reasons. |\n\n### srcDir\n\n```\nabstract fun srcDir(srcDir: Any): Any\n```\n\nAdds the given source directory to this set.\n\n| Parameters ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| srcDir: [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. |\n\n### srcDirs\n\n```\nabstract fun srcDirs(vararg srcDirs: Any): Any\n```\n\nAdds the given source directories to this set.\n\n| Parameters ||\n|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| vararg srcDirs: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | The source directories. These are evaluated as [org.gradle.api.Project.files](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#files(java.lang.Object...)) This method has a return value for legacy reasons. |"]]