Stay organized with collections
Save and categorize content based on your preferences.
AndroidSourceDirectorySet
@Incubating interface AndroidSourceDirectorySet
An AndroidSourceDirectorySet represents a set of directory inputs 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 source directories for this set.
|
Any |
Adds the given source directory to this set.
|
Any |
Adds the given source directories to this set.
|
Public functions
getName
fun getName(): String
A concise name for the source directory (typically used to identify it in a collection).
srcDir
fun srcDir(srcDir: Any?): Any
Adds the given source directory to this set.
The source directory. This is evaluated as org.gradle.api.Project.file
This method has a return value for legacy reasons.
srcDirs
fun srcDirs(vararg srcDirs: Any?): Any
Adds the given source directories to this set.
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```\n@Incubating interface AndroidSourceDirectorySet\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn AndroidSourceDirectorySet represents a set of directory inputs 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/7.2/com/android/build/api/dsl/AndroidSourceDirectorySet#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) | [setSrcDirs](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidSourceDirectorySet#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| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcDir](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidSourceDirectorySet#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| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [srcDirs](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidSourceDirectorySet#srcDirs(kotlin.Array))`(vararg srcDirs: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?)` Adds the given source directories to this set. |\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### setSrcDirs\n\n```\nfun 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-kotlin.Array[kotlin.Any]-) This method has a return value for legacy reasons. |\n\n### srcDir\n\n```\nfun srcDir(srcDir: Any?): Any\n```\n\nAdds the given source directory to this set.\n\nThe 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-)\n\nThis method has a return value for legacy reasons. \n\n### srcDirs\n\n```\nfun srcDirs(vararg srcDirs: Any?): Any\n```\n\nAdds the given source directories to this set.\n\nThe source directories. These are evaluated as [org.gradle.api.Project.files](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#files-kotlin.Array[kotlin.Any]-)\n\nThis method has a return value for legacy reasons."]]