This branch contains recipes compatible with AGP 8.5. If you want to find recipes
for other AGP versions, switch to the corresponding agp-*
branch.
This branch is read only. Contributions are only accepted on the studio-main
branch. See CONTRIBUTION.md
there.
Index is organized in categories, offering different ways to reach the recipe you want.
- Android Assets - legacyTaskBridging, addGeneratedSourceFolder
- Android Manifest - perVariantManifestPlaceholder, transformManifest, createSingleArtifact
- Artifact API - addMultipleArtifact, appendToScopedArtifacts, getMultipleArtifact, transformAllClasses, getScopedArtifacts, transformMultiple, listenToArtifacts, listenToMultipleArtifact, transformDirectory, transformManifest, appendToMultipleArtifact, getSingleArtifact, workerEnabledTransformation, createSingleArtifact
- DSL - addBuildTypeUsingDslFinalize, extendingAgp
- Dependency Resolution - variantDependencySubstitutionTest
- Sources - legacyTaskBridging, addGeneratedSourceFolder, addCustomSourceType
- TestFixtures - testFixtures
- AndroidComponentsExtension.beforeVariants() - selectVariants
- AndroidComponentsExtension.onVariants() - perVariantManifestPlaceholder, addMultipleArtifact, appendToScopedArtifacts, getMultipleArtifact, variantDependencySubstitutionTest, legacyTaskBridging, registerPreBuild, transformAllClasses, addGeneratedSourceFolder, getScopedArtifacts, asmTransformClasses, transformMultiple, listenToArtifacts, listenToMultipleArtifact, addCustomBuildConfigFields, transformDirectory, transformManifest, onVariants, allProjectsApkAction, variantOutput, appendToMultipleArtifact, getSingleArtifact, addCustomSourceType, workerEnabledTransformation, extendingAgp, createSingleArtifact
- AndroidComponentsExtension.registerExtension() - extendingAgp
- AndroidComponentsExtension.selector() - allProjectsApkAction, variantOutput, selectVariants
- ApplicationVariant.applicationId - onVariants
- ApplicationVariant.outputs - variantOutput
- Artifact.ContainsMany - listenToArtifacts
- ArtifactTransformationRequest - workerEnabledTransformation
- Artifacts.add() - addMultipleArtifact, transformMultiple
- Artifacts.forScope() - appendToScopedArtifacts, transformAllClasses, getScopedArtifacts
- Artifacts.get() - perVariantManifestPlaceholder, addMultipleArtifact, legacyTaskBridging, addGeneratedSourceFolder, transformMultiple, transformDirectory, transformManifest, allProjectsApkAction, variantOutput, appendToMultipleArtifact, getSingleArtifact
- Artifacts.getAll() - getMultipleArtifact
- Artifacts.use() - transformMultiple, listenToArtifacts, listenToMultipleArtifact, transformDirectory, transformManifest, appendToMultipleArtifact, workerEnabledTransformation, createSingleArtifact
- BuildConfigField() - addCustomBuildConfigFields
- BuiltArtifact - workerEnabledTransformation
- BuiltArtifact.versionCode - listenToArtifacts
- BuiltArtifact.versionName - listenToArtifacts
- BuiltArtifacts.elements - listenToArtifacts
- BuiltArtifacts.variantName - listenToArtifacts
- BuiltArtifactsLoader.load() - listenToArtifacts
- CanMinifyAndroidResourcesBuilder.shrinkResources - selectVariants
- CanMinifyCodeBuilder.isMinifyEnabled - selectVariants
- CombiningOperationRequest.toTransform() - transformMultiple
- Component.artifacts - addMultipleArtifact, appendToScopedArtifacts, getMultipleArtifact, legacyTaskBridging, addGeneratedSourceFolder, getScopedArtifacts, transformMultiple, transformDirectory, transformManifest, variantOutput, appendToMultipleArtifact, createSingleArtifact
- Component.compileConfiguration - variantDependencySubstitutionTest
- Component.runtimeConfiguration - variantDependencySubstitutionTest
- Component.sources - legacyTaskBridging, addGeneratedSourceFolder, addCustomSourceType
- Configuration.resolutionStrategy - variantDependencySubstitutionTest
- DslExtension.Builder.build() - extendingAgp
- DslExtension.Builder.extendBuildTypeWith() - extendingAgp
- DslExtension.Builder.extendProductFlavorWith() - extendingAgp
- DslExtension.Builder.extendProjectWith() - extendingAgp
- DslLifecycle.finalizeDsl() - addBuildTypeUsingDslFinalize
- GeneratesApk.applicationId - onVariants
- Gradle.beforeProject() - allProjectsApkAction
- HasUnitTestBuilder.enableUnitTest - selectVariants
- InAndOutDirectoryOperationRequest.toTransform() - transformDirectory
- InAndOutDirectoryOperationRequest.toTransformMany() - workerEnabledTransformation
- InAndOutFileOperationRequest.toTransform() - transformManifest
- Instrumentation.transformClassesWith() - asmTransformClasses
- LifeCycleTasks.registerPreBuild() - registerPreBuild
- MapProperty.put() - perVariantManifestPlaceholder, addCustomBuildConfigFields
- MultipleArtifact.MULTIDEX_KEEP_PROGUARD - getMultipleArtifact
- MultipleArtifact.NATIVE_DEBUG_METADATA - addMultipleArtifact, transformMultiple, listenToMultipleArtifact, appendToMultipleArtifact
- MultipleArtifactTypeOutOperationRequest.toListenTo() - listenToMultipleArtifact
- OutOperationRequest.toAppendTo() - appendToMultipleArtifact
- OutOperationRequest.toCreate() - createSingleArtifact
- OutOperationRequest.toListenTo() - listenToArtifacts
- Plugin - allProjectsApkAction
- ResolutionStrategy.dependencySubstitution() - variantDependencySubstitutionTest
- ScopedArtifact.CLASSES - appendToScopedArtifacts, transformAllClasses, getScopedArtifacts, asmTransformClasses
- ScopedArtifacts.Scope.ALL - appendToScopedArtifacts, getScopedArtifacts
- ScopedArtifacts.Scope.PROJECT - appendToScopedArtifacts, transformAllClasses, getScopedArtifacts, asmTransformClasses
- ScopedArtifacts.use() - appendToScopedArtifacts, transformAllClasses, getScopedArtifacts, asmTransformClasses
- ScopedArtifactsOperation.toAppend() - appendToScopedArtifacts
- ScopedArtifactsOperation.toGet() - appendToScopedArtifacts, getScopedArtifacts, asmTransformClasses
- ScopedArtifactsOperation.toTransform() - transformAllClasses
- SingleArtifact.APK - listenToArtifacts, allProjectsApkAction, workerEnabledTransformation
- SingleArtifact.ASSETS - legacyTaskBridging, addGeneratedSourceFolder, transformDirectory
- SingleArtifact.BUNDLE - addMultipleArtifact, appendToMultipleArtifact, getSingleArtifact
- SingleArtifact.MERGED_MANIFEST - perVariantManifestPlaceholder, transformManifest, variantOutput, createSingleArtifact
- SourceDirectories.addGeneratedSourceDirectory() - legacyTaskBridging, addGeneratedSourceFolder, addCustomSourceType
- SourceDirectories.addStaticSourceDirectory() - addCustomSourceType
- TaskBasedOperation.wiredWith() - transformMultiple, listenToArtifacts, createSingleArtifact
- TaskBasedOperation.wiredWithDirectories() - transformDirectory, workerEnabledTransformation
- TaskBasedOperation.wiredWithFiles() - transformManifest
- TaskBasedOperation.wiredWithMultiple() - listenToMultipleArtifact
- TaskOutputs.upToDateWhen() - transformManifest
- TaskProvider.flatMap() - createSingleArtifact
- TaskProvider.map() - addCustomBuildConfigFields
- Variant.buildConfigFields - addCustomBuildConfigFields
- Variant.components - variantDependencySubstitutionTest
- Variant.manifestPlaceholders - perVariantManifestPlaceholder
- Variant.nestedComponents - variantDependencySubstitutionTest
- VariantBuilder.minSdk - selectVariants
- VariantExtensionConfig - extendingAgp
- VariantOutputConfiguration.OutputType.SINGLE - variantOutput
- VariantOutputConfiguration.outputType - variantOutput
- VariantSelector.all() - variantOutput, selectVariants
- VariantSelector.withBuildType() - variantDependencySubstitutionTest, allProjectsApkAction, selectVariants
- VariantSelector.withFlavor() - variantOutput, selectVariants
- VariantSelector.withName() - selectVariants
- task.getOutputs() - transformManifest
- DslExtension.Builder().extendProjectWith().extendBuildTypeWith().extendProductFlavorWith().build() - extendingAgp
- androidComponents.beforeVariants {} - selectVariants
- androidComponents.finalizeDsl {} - addBuildTypeUsingDslFinalize
- androidComponents.onVariants {} - perVariantManifestPlaceholder, addMultipleArtifact, appendToScopedArtifacts, getMultipleArtifact, variantDependencySubstitutionTest, legacyTaskBridging, registerPreBuild, transformAllClasses, addGeneratedSourceFolder, getScopedArtifacts, asmTransformClasses, transformMultiple, listenToArtifacts, listenToMultipleArtifact, addCustomBuildConfigFields, transformDirectory, transformManifest, onVariants, allProjectsApkAction, variantOutput, appendToMultipleArtifact, getSingleArtifact, addCustomSourceType, workerEnabledTransformation, extendingAgp, createSingleArtifact
- androidComponents.registerExtension() - extendingAgp
- androidComponents.selector().all() - variantOutput, selectVariants
- androidComponents.selector().withBuildType() - variantDependencySubstitutionTest, allProjectsApkAction, selectVariants
- androidComponents.selector().withFlavor() - variantOutput, selectVariants
- androidComponents.selector().withName() - selectVariants
- configuration.resolutionStrategy.dependencySubstitution {} - variantDependencySubstitutionTest
- settings.gradle.beforeProject {} - allProjectsApkAction
- substitute().using() - variantDependencySubstitutionTest
- task.outputs.upToDateWhen {} - transformManifest
- transformationRequest.submit() - workerEnabledTransformation
- variant.applicationId - onVariants
- variant.artifacts.add() - addMultipleArtifact, transformMultiple
- variant.artifacts.forScope().use().toAppend() - appendToScopedArtifacts
- variant.artifacts.forScope().use().toGet() - getScopedArtifacts, asmTransformClasses
- variant.artifacts.forScope().use().toTransform() - transformAllClasses
- variant.artifacts.get() - perVariantManifestPlaceholder, addMultipleArtifact, legacyTaskBridging, addGeneratedSourceFolder, asmTransformClasses, transformMultiple, transformDirectory, transformManifest, allProjectsApkAction, variantOutput, appendToMultipleArtifact, getSingleArtifact
- variant.artifacts.getAll() - getMultipleArtifact
- variant.artifacts.use().wiredWith().toAppendTo() - appendToMultipleArtifact
- variant.artifacts.use().wiredWith().toCreate() - createSingleArtifact
- variant.artifacts.use().wiredWith().toListenTo() - listenToArtifacts, listenToMultipleArtifact
- variant.artifacts.use().wiredWith().toTransform() - transformMultiple
- variant.artifacts.use().wiredWithDirectories().toTransform() - transformDirectory
- variant.artifacts.use().wiredWithDirectories().toTransformMany() - workerEnabledTransformation
- variant.artifacts.use().wiredWithFiles().toTransform() - transformManifest
- variant.buildConfigFields.put() - addCustomBuildConfigFields
- variant.instrumentation.transformClassesWith() - asmTransformClasses
- variant.manifestPlaceholders.put() - perVariantManifestPlaceholder
- variant.registerPreBuild() - registerPreBuild
- variant.sources.*.addGeneratedSourceDirectory() - legacyTaskBridging, addGeneratedSourceFolder, addCustomSourceType
- variant.sources.*.addStaticSourceDirectory() - addCustomSourceType
- variant.sources.*.all - addGeneratedSourceFolder, addCustomSourceType
- All projects - allProjectsApkAction
- Extending AGP DSL - extendingAgp
- Legacy API bridging - legacyTaskBridging
- Placeholders - perVariantManifestPlaceholder
- Renaming APKs - listenToArtifacts
- SourceDirectories.Flat - addCustomSourceType
- SourceDirectories.Layered - addGeneratedSourceFolder
- SourceDirectories.add - addCustomSourceType
- registerSourceType - addCustomSourceType
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.