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

Removed unused gradle function #2955

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}