Fixed: AAB file was not found when uploading to Play Store for custom apps.

* Since we upgraded Gradle, we switched to using `layout.buildDirectory` instead of `buildDir`, as the latter is now deprecated. The new approach returns a DirectoryProperty object instead of a direct build directory path. This caused our custom apps' CD pipeline to be unable to locate the generated `.aab` file. We have now updated the code to correctly retrieve the directory path from the `DirectoryProperty` object.
This commit is contained in:
MohitMaliFtechiz 2025-04-03 17:15:52 +05:30
parent bb25fcaaf5
commit 1d1c3f3f63

View File

@ -250,7 +250,7 @@ fun ProductFlavor.createPublishBundleWithAssetPlayDelivery(): TaskProvider<Task>
.transactionWithCommit(packageName) {
val generatedBundleFile =
File(
"${layout.buildDirectory}/outputs/bundle/${capitalizedName.lowercase(Locale.getDefault())}" +
"${layout.buildDirectory.get()}/outputs/bundle/${capitalizedName.lowercase(Locale.getDefault())}" +
"Release/custom-${capitalizedName.lowercase(Locale.getDefault())}-release.aab"
)
if (generatedBundleFile.exists()) {