Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Removed unused gradle function (#2955)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin authored Mar 16, 2020
1 parent 36719d3 commit 2516a84
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -558,39 +558,3 @@ if (gradle.hasProperty('localProperties.dependencySubstitutions.geckoviewTopsrcd
apply from: "${topsrcdir}/substitute-local-geckoview.gradle"
}

// -------------------------------------------------------------------------------------------------
// Dynamically set versionCode (See tools/build/versionCode.gradle
// -------------------------------------------------------------------------------------------------

android.applicationVariants.all { variant ->
def buildType = variant.buildType.name
if (gradle.hasProperty('userProperties.taskclusterBuild')) {
def versionCode = generatedVersionCode

// The Google Play Store does not allow multiple APKs for the same app that all have the
// same version code. Therefore we need to have different version codes for our ARM and x86
// builds.
// Our generated version code has a length of 8 (See tools/gradle/versionCode.gradle).
// We will prefix our ARM builds with 1 and our x86 builds with 2. Our x86 builds need a
// higher version code to avoid installing ARM builds on an x86 device with ARM
// compatibility mode.
def multiplier = 100000000

if (variant.flavorName.contains("x86_64")) {
versionCode = versionCode + (3 * multiplier)
} else if (variant.flavorName.contains("Aarch64")) {
versionCode = versionCode + (2 * multiplier)
} else if (variant.flavorName.contains("Arm")) {
versionCode = versionCode + (1 * multiplier)
}

variant.outputs.each { output ->
output.versionCodeOverride = versionCode
}
}

println("----------------------------------------------")
println("Build type: " + buildType)
println("Flavor: " + variant.flavorName)
println("Version code: " + variant.mergedFlavor.versionCode)
}

0 comments on commit 2516a84

Please sign in to comment.