Skip to content

Commit

Permalink
Merge pull request #3641 from kiwix/Issue#3640
Browse files Browse the repository at this point in the history
Fixed: Resolved the issue where Google Play Store displayed an error during APK upload.
  • Loading branch information
kelson42 authored Dec 28, 2023
2 parents f41701c + 62883fe commit fff9991
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ fun ProductFlavor.createPublishApkWithExpansionTask(
createPublisher(File(rootDir, "playstore.json"))
.transactionWithCommit(packageName) {
val variants =
applicationVariants.releaseVariantsFor(this@createPublishApkWithExpansionTask)
applicationVariants.releaseVariantsFor(this@createPublishApkWithExpansionTask).also {
print("createPublishApkWithExpansionTask: $it")
}
variants.forEach(::uploadApk)
uploadExpansionTo(file, variants[0].versionCodeOverride)
variants.drop(1).forEach { attachExpansionTo(variants[0].versionCodeOverride, it) }
Expand All @@ -189,7 +191,9 @@ fun ProductFlavor.createPublishApkWithExpansionTask(
@Suppress("DEPRECATION")
fun DomainObjectSet<ApplicationVariant>.releaseVariantsFor(productFlavor: ProductFlavor) =
find { it.name.equals("${productFlavor.name}Release", true) }!!
.outputs.filterIsInstance<ApkVariantOutput>().sortedBy { it.versionCodeOverride }
.outputs.filterIsInstance<ApkVariantOutput>()
.filter { !it.outputFileName.contains("universal") }
.sortedBy { it.versionCodeOverride }

fun ProductFlavor.createPublishBundleWithAssetPlayDelivery(): Task {
val capitalizedName =
Expand Down

0 comments on commit fff9991

Please sign in to comment.