This branch contains recipes compatible with AGP 8.7. 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 - createSingleArtifact, transformManifest, perVariantManifestPlaceholder
- Artifact API - listenToArtifacts, listenToMultipleArtifact, createSingleArtifact, transformAllClasses, getScopedArtifacts, appendToMultipleArtifact, addMultipleArtifact, workerEnabledTransformation, getSingleArtifact, transformManifest, transformDirectory, transformMultiple, appendToScopedArtifacts, getMultipleArtifact
- DSL - extendingAgp, addBuildTypeUsingDslFinalize
- Dependency Resolution - variantDependencySubstitutionTest
- Sources - addCustomSourceType, legacyTaskBridging, addGeneratedSourceFolder
- TestFixtures - testFixtures
- AndroidComponentsExtension.beforeVariants() - selectVariants, disableTests
- AndroidComponentsExtension.onVariants() - listenToArtifacts, listenToMultipleArtifact, onVariants, createSingleArtifact, transformAllClasses, addCustomSourceType, legacyTaskBridging, getScopedArtifacts, appendToMultipleArtifact, addMultipleArtifact, extendingAgp, workerEnabledTransformation, variantOutput, getSingleArtifact, transformManifest, asmTransformClasses, variantDependencySubstitutionTest, addCustomBuildConfigFields, addGeneratedSourceFolder, transformDirectory, perVariantManifestPlaceholder, transformMultiple, appendToScopedArtifacts, allProjectsApkAction, disableTests, getMultipleArtifact, registerPreBuild
- AndroidComponentsExtension.registerExtension() - extendingAgp
- AndroidComponentsExtension.selector() - variantOutput, selectVariants, allProjectsApkAction
- ApplicationVariant.applicationId - onVariants
- ApplicationVariant.outputs - variantOutput
- Artifact.ContainsMany - listenToArtifacts
- ArtifactTransformationRequest - workerEnabledTransformation
- Artifacts.add() - addMultipleArtifact, transformMultiple
- Artifacts.forScope() - transformAllClasses, getScopedArtifacts, appendToScopedArtifacts
- Artifacts.get() - legacyTaskBridging, appendToMultipleArtifact, addMultipleArtifact, variantOutput, getSingleArtifact, transformManifest, addGeneratedSourceFolder, transformDirectory, perVariantManifestPlaceholder, transformMultiple, allProjectsApkAction
- Artifacts.getAll() - getMultipleArtifact
- Artifacts.use() - listenToArtifacts, listenToMultipleArtifact, createSingleArtifact, appendToMultipleArtifact, workerEnabledTransformation, transformManifest, transformDirectory, transformMultiple
- 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 - createSingleArtifact, legacyTaskBridging, getScopedArtifacts, appendToMultipleArtifact, addMultipleArtifact, variantOutput, transformManifest, addGeneratedSourceFolder, transformDirectory, transformMultiple, appendToScopedArtifacts, getMultipleArtifact
- Component.compileConfiguration - variantDependencySubstitutionTest
- Component.runtimeConfiguration - variantDependencySubstitutionTest
- Component.sources - addCustomSourceType, legacyTaskBridging, addGeneratedSourceFolder
- 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
- HasDeviceTests.deviceTests - disableTests
- HasDeviceTestsBuilder.deviceTests - disableTests
- HasHostTests.hostTests - disableTests
- HasHostTestsBuilder.hostTests - disableTests
- HasUnitTestBuilder.enableUnitTest - selectVariants
- InAndOutDirectoryOperationRequest.toTransform() - transformDirectory
- InAndOutDirectoryOperationRequest.toTransformMany() - workerEnabledTransformation
- InAndOutFileOperationRequest.toTransform() - transformManifest
- Instrumentation.transformClassesWith() - asmTransformClasses
- LifeCycleTasks.registerPreBuild() - registerPreBuild
- MapProperty.put() - addCustomBuildConfigFields, perVariantManifestPlaceholder
- MultipleArtifact.MULTIDEX_KEEP_PROGUARD - getMultipleArtifact
- MultipleArtifact.NATIVE_DEBUG_METADATA - listenToMultipleArtifact, appendToMultipleArtifact, addMultipleArtifact, transformMultiple
- MultipleArtifactTypeOutOperationRequest.toListenTo() - listenToMultipleArtifact
- OutOperationRequest.toAppendTo() - appendToMultipleArtifact
- OutOperationRequest.toCreate() - createSingleArtifact
- OutOperationRequest.toListenTo() - listenToArtifacts
- Plugin - allProjectsApkAction
- ResolutionStrategy.dependencySubstitution() - variantDependencySubstitutionTest
- ScopedArtifact.CLASSES - transformAllClasses, getScopedArtifacts, asmTransformClasses, appendToScopedArtifacts
- ScopedArtifacts.Scope.ALL - getScopedArtifacts, appendToScopedArtifacts
- ScopedArtifacts.Scope.PROJECT - transformAllClasses, getScopedArtifacts, asmTransformClasses, appendToScopedArtifacts
- ScopedArtifacts.use() - transformAllClasses, getScopedArtifacts, asmTransformClasses, appendToScopedArtifacts
- ScopedArtifactsOperation.toAppend() - appendToScopedArtifacts
- ScopedArtifactsOperation.toGet() - getScopedArtifacts, asmTransformClasses, appendToScopedArtifacts
- ScopedArtifactsOperation.toTransform() - transformAllClasses
- SingleArtifact.APK - listenToArtifacts, workerEnabledTransformation, allProjectsApkAction
- SingleArtifact.ASSETS - legacyTaskBridging, addGeneratedSourceFolder, transformDirectory
- SingleArtifact.BUNDLE - appendToMultipleArtifact, addMultipleArtifact, getSingleArtifact
- SingleArtifact.MERGED_MANIFEST - createSingleArtifact, variantOutput, transformManifest, perVariantManifestPlaceholder
- SourceDirectories.addGeneratedSourceDirectory() - addCustomSourceType, legacyTaskBridging, addGeneratedSourceFolder
- SourceDirectories.addStaticSourceDirectory() - addCustomSourceType
- TaskBasedOperation.wiredWith() - listenToArtifacts, createSingleArtifact, transformMultiple
- TaskBasedOperation.wiredWithDirectories() - workerEnabledTransformation, transformDirectory
- 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, selectVariants, allProjectsApkAction
- VariantSelector.withFlavor() - variantOutput, selectVariants
- VariantSelector.withName() - selectVariants
- task.getOutputs() - transformManifest
- DslExtension.Builder().extendProjectWith().extendBuildTypeWith().extendProductFlavorWith().build() - extendingAgp
- HasDeviceTests.deviceTests.get() - disableTests
- HasDeviceTestsBuilder.deviceTests.get().enable - disableTests
- HasHostTests.hostTests.get() - disableTests
- HasHostTestsBuilder.hostTests.get().enable - disableTests
- androidComponents.beforeVariants {} - selectVariants, disableTests
- androidComponents.finalizeDsl {} - addBuildTypeUsingDslFinalize
- androidComponents.onVariants {} - listenToArtifacts, listenToMultipleArtifact, onVariants, createSingleArtifact, transformAllClasses, addCustomSourceType, legacyTaskBridging, getScopedArtifacts, appendToMultipleArtifact, addMultipleArtifact, extendingAgp, workerEnabledTransformation, variantOutput, getSingleArtifact, transformManifest, asmTransformClasses, variantDependencySubstitutionTest, addCustomBuildConfigFields, addGeneratedSourceFolder, transformDirectory, perVariantManifestPlaceholder, transformMultiple, appendToScopedArtifacts, allProjectsApkAction, disableTests, getMultipleArtifact, registerPreBuild
- androidComponents.registerExtension() - extendingAgp
- androidComponents.selector().all() - variantOutput, selectVariants
- androidComponents.selector().withBuildType() - variantDependencySubstitutionTest, selectVariants, allProjectsApkAction
- 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() - legacyTaskBridging, appendToMultipleArtifact, addMultipleArtifact, variantOutput, getSingleArtifact, transformManifest, asmTransformClasses, addGeneratedSourceFolder, transformDirectory, perVariantManifestPlaceholder, transformMultiple, allProjectsApkAction
- 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() - addCustomSourceType, legacyTaskBridging, addGeneratedSourceFolder
- variant.sources.*.addStaticSourceDirectory() - addCustomSourceType
- variant.sources.*.all - addCustomSourceType, addGeneratedSourceFolder
- All projects - allProjectsApkAction
- DeviceTestBuilder.ANDROID_TEST_TYPE - disableTests
- Extending AGP DSL - extendingAgp
- HostTestBuilder.UNIT_TEST_TYPE - disableTests
- 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.