Commit 1f52b3be authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

Android: use chromium version number in Chrome/WebView

No change to production logic.

Before this CL, locally compiled APKs will have a versionName attribute
equal to "Developer Build". This CL changes public Chrome and WebView
targets to use the real chromium version number from version.gni.

This affects ChromePublic, ChromeModernPublic, MonochromePublic, and
SystemWebView. Downstream targets will be addressed in a follow-up CL.

R=agrieve@chromium.org, torne@chromium.org

      chrome_modern_public_apk, monochrome_public_apk) and run `aapt
      dump badging` on each APK and grep for 'versionName'.

Bug: 866739
Test: Build APKs (system_webview_apk, chrome_public_apk,
Change-Id: I4e1ab22a2d646ef996a84dd79b015754549bf6ad
Reviewed-on: https://chromium-review.googlesource.com/1147871
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577699}
parent c16b223b
......@@ -5,6 +5,7 @@
import("//android_webview/system_webview_apk_tmpl.gni")
import("//android_webview/webview_repack_locales.gni")
import("//android_webview/variables.gni")
import("//build/config/android/chrome_version.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/locales.gni")
......@@ -1067,6 +1068,7 @@ android_aidl("aw_variations_seed_server_aidl") {
if (public_android_sdk) {
system_webview_apk_tmpl("system_webview_apk") {
version_name = chrome_version_name
android_manifest = system_webview_android_manifest
android_manifest_dep = ":system_webview_manifest"
deps = [
......
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/config.gni")
import("//build/util/version.gni")
chrome_version_name = android_default_version_name
if (chrome_version_name == "Developer Build") {
# In general, let the versionName attribute in the APK be the real chromium
# version number. This is important for WebView/Monochrome, as we expose this
# in an API, but we implement this for other Chrome targets for consistency.
# We check for "Developer Build" so that we don't interfere with official
# builders (which currently set the version number with this GN arg).
chrome_version_name = chrome_version_full
}
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//base/android/jni_generator/jni_exception_list.gni")
import("//build/config/android/chrome_version.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/util/process_version.gni")
......@@ -1200,6 +1201,7 @@ template("chrome_public_apk_or_module_tmpl") {
forward_variables_from(invoker,
[
"apk_name",
"version_name",
"is_base_module",
"module_name",
"target_type",
......@@ -1216,6 +1218,7 @@ template("chrome_public_apk_or_module_tmpl") {
}
chrome_public_apk_or_module_tmpl("chrome_public_apk") {
version_name = chrome_version_name
apk_name = "ChromePublic"
target_type = "android_apk"
}
......@@ -1254,6 +1257,7 @@ template("chrome_modern_public_apk_or_module_tmpl") {
forward_variables_from(invoker,
[
"apk_name",
"version_name",
"is_base_module",
"module_name",
"target_type",
......@@ -1277,6 +1281,7 @@ template("chrome_modern_public_apk_or_module_tmpl") {
}
chrome_modern_public_apk_or_module_tmpl("chrome_modern_public_apk") {
version_name = chrome_version_name
apk_name = "ChromeModernPublic"
target_type = "android_apk"
}
......@@ -1304,6 +1309,7 @@ template("monochrome_public_apk_or_module_tmpl") {
forward_variables_from(invoker,
[
"apk_name",
"version_name",
"is_base_module",
"module_name",
"target_type",
......@@ -1334,6 +1340,7 @@ template("monochrome_public_apk_or_module_tmpl") {
}
monochrome_public_apk_or_module_tmpl("monochrome_public_apk") {
version_name = chrome_version_name
apk_name = "MonochromePublic"
target_type = "android_apk"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment