Sources

@Incubating interface Sources


Provides access to all source directories for a Variant.

since 7.2

Summary

Public functions

SourceDirectories
getByName(name: String?)

Access (and potentially creates) a new SourceDirectories for a custom source type that can be referenced by its name.

Public properties

SourceDirectories

Access to the Java source folders.

Public functions

getByName

fun getByName(name: String?): SourceDirectories

Access (and potentially creates) a new SourceDirectories for a custom source type that can be referenced by its name.

The first caller will create the new instance, other callers with the same name will get the same instance returned. Any callers can obtain the final list of the folders registered under this custom source type by calling SourceDirectories.all.

These sources directories are attached to the variant and will be visible to Android Studio.

Public properties

java

val javaSourceDirectories

Access to the Java source folders.