AndroidSourceSet

public interface AndroidSourceSet extends Named


An AndroidSourceSet represents a logical group of Java, aidl and RenderScript sources as well as Android and non-Android (Java-style) resources.

Summary

Public methods

abstract void

The Android AIDL source directory for this source set.

abstract void

The Android Assets directory for this source set.

abstract void

The Android Baseline Profiles source directory for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android AIDL source directory for this source set.

abstract @NonNull String

Returns the name of the annotation processing tool classpath for this source set.

abstract @NonNull String

Returns the name of the api configuration for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android Assets directory for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android Baseline Profiles source directory for this source set.

abstract @NonNull String

Returns the name of the compileOnly configuration for this source set.

abstract @NonNull String

Returns the name of the implementation configuration for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Java source for this source-set

abstract @NonNull AndroidSourceDirectorySet

The Android JNI source directory for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android JNI libs directory for this source-set

abstract @NonNull AndroidSourceDirectorySet

The Kotlin source for this source-set

abstract @NonNull AndroidSourceFile

The Android Manifest file for this source-set.

abstract @NonNull AndroidSourceDirectorySet

The machine learning models directory for this source set.

abstract @NonNull String

Returns the name of this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android RenderScript source directory for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android Resources directory for this source-set.

abstract @NonNull AndroidSourceDirectorySet

The Java-style resources for this source-set

abstract @NonNull String

Returns the name of the implementation configuration for this source set.

abstract @NonNull AndroidSourceDirectorySet

The Android shaders directory for this source set.

abstract @NonNull String

Returns the name of the wearApp configuration for this source set.

abstract void

The Java source for this source-set

abstract void

This method is deprecated. Unused

abstract void

The Android JNI libs directory for this source-set

abstract void

The Java source for this source-set

abstract void

The Android Manifest file for this source-set.

abstract void

The machine learning models directory for this source set.

abstract void

The Android RenderScript source directory for this source set.

abstract void

The Android Resources directory for this source-set.

abstract void

The Java-style resources for this source-set

abstract @NonNull Object

Sets the root of the source sets to a given path.

abstract void

The Android shaders directory for this source set.

Public methods

aidl

abstract void aidl(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android AIDL source directory for this source set.

assets

abstract void assets(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android Assets directory for this source set.

baselineProfiles

@Incubating
abstract void baselineProfiles(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android Baseline Profiles source directory for this source set.

getAidl

abstract @NonNull AndroidSourceDirectorySet getAidl()

The Android AIDL source directory for this source set.

getAnnotationProcessorConfigurationName

abstract @NonNull String getAnnotationProcessorConfigurationName()

Returns the name of the annotation processing tool classpath for this source set.

getApiConfigurationName

abstract @NonNull String getApiConfigurationName()

Returns the name of the api configuration for this source set.

getAssets

abstract @NonNull AndroidSourceDirectorySet getAssets()

The Android Assets directory for this source set.

getBaselineProfiles

@Incubating
abstract @NonNull AndroidSourceDirectorySet getBaselineProfiles()

The Android Baseline Profiles source directory for this source set.

getCompileOnlyConfigurationName

abstract @NonNull String getCompileOnlyConfigurationName()

Returns the name of the compileOnly configuration for this source set.

getImplementationConfigurationName

abstract @NonNull String getImplementationConfigurationName()

Returns the name of the implementation configuration for this source set.

getJava

abstract @NonNull AndroidSourceDirectorySet getJava()

The Java source for this source-set

getJni

@Incubating
abstract @NonNull AndroidSourceDirectorySet getJni()

The Android JNI source directory for this source set.

This is unused and will be removed in AGP 9.0

getJniLibs

abstract @NonNull AndroidSourceDirectorySet getJniLibs()

The Android JNI libs directory for this source-set

getKotlin

abstract @NonNull AndroidSourceDirectorySet getKotlin()

The Kotlin source for this source-set

getManifest

abstract @NonNull AndroidSourceFile getManifest()

The Android Manifest file for this source-set.

getMlModels

abstract @NonNull AndroidSourceDirectorySet getMlModels()

The machine learning models directory for this source set.

getName

abstract @NonNull String getName()

Returns the name of this source set.

getRenderscript

abstract @NonNull AndroidSourceDirectorySet getRenderscript()

The Android RenderScript source directory for this source set.

getRes

abstract @NonNull AndroidSourceDirectorySet getRes()

The Android Resources directory for this source-set.

getResources

abstract @NonNull AndroidSourceDirectorySet getResources()

The Java-style resources for this source-set

getRuntimeOnlyConfigurationName

abstract @NonNull String getRuntimeOnlyConfigurationName()

Returns the name of the implementation configuration for this source set.

getShaders

abstract @NonNull AndroidSourceDirectorySet getShaders()

The Android shaders directory for this source set.

getWearAppConfigurationName

abstract @NonNull String getWearAppConfigurationName()

Returns the name of the wearApp configuration for this source set.

java

abstract void java(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Java source for this source-set

jni

@Incubating
abstract void jni(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android JNI source directory for this source set.

This is unused and will be removed in AGP 9.0

jniLibs

abstract void jniLibs(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android JNI libs directory for this source-set

kotlin

abstract void kotlin(@NonNull Action<@NonNull AndroidSourceDirectorySet> action)

The Java source for this source-set

manifest

abstract void manifest(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceFileUnit> action
)

The Android Manifest file for this source-set.

mlModels

abstract void mlModels(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The machine learning models directory for this source set.

renderscript

abstract void renderscript(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android RenderScript source directory for this source set.

res

abstract void res(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android Resources directory for this source-set.

resources

abstract void resources(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Java-style resources for this source-set

setRoot

abstract @NonNull Object setRoot(@NonNull String path)

Sets the root of the source sets to a given path.

All entries of the source-set are located under this root directory.

This method has a return value for legacy reasons.

Parameters
@NonNull String path

the root directory path to use.

shaders

abstract void shaders(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidSourceDirectorySetUnit> action
)

The Android shaders directory for this source set.