summaryrefslogtreecommitdiffstats
path: root/android_webview/system_webview_apk_tmpl.gni
blob: 23a0051045b4ecaa3fc2095c9e2f82808249a05d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2015 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/config/android/rules.gni")

template("system_webview_apk_tmpl") {
  android_apk(target_name) {
    forward_variables_from(invoker, "*")

    deps += [
      "//android_webview:assets",
      "//android_webview:libwebviewchromium",
      "//base:base_java",
    ]

    if (!defined(alternative_android_sdk_jar)) {
      alternative_android_sdk_jar = webview_framework_jar
    }

    shared_resources = true
    native_libs = [ "libwebviewchromium.so" ]
    native_lib_version_rule = "//build/util:chrome_version_json"
    _native_lib_file =
        rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
    native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
    extensions_to_not_compress = ".lpak,.pak,.bin,.dat"

    if (!is_debug) {
      proguard_enabled = true
      proguard_configs = [ "//android_webview/apk/java/proguard.flags" ]
    }
  }
}