summaryrefslogtreecommitdiffstats
path: root/content/shell/android/BUILD.gn
blob: 47b3d61ca20ce9855cd8d1b776bcf7a3da309a93 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Copyright 2014 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")

generate_jni("content_shell_jni_headers") {
  jni_package = "content/shell"
  sources = [
    "browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java",
    "java/src/org/chromium/content_shell/ShellLayoutTestUtils.java",
    "java/src/org/chromium/content_shell/ShellManager.java",
    "java/src/org/chromium/content_shell/Shell.java",
  ]
}

shared_library("libcontent_shell_content_view") {
  # TODO(GYP,cjhopman): enable these when content_shell builds
  deps = [
    ":content_shell_jni_headers",
#"//content/shell:content_shell",
#"//content/shell:content_shell_pak",
    "//skia",
    "//media/base/android",
  ]
  sources = [
#"shell_library_loader.cc",
#"shell_library_loader.h",
  ]
  if (is_android_webview_build) {
    ldflags = [
      "-lgabi++",
    ]
  }
}

android_resources("content_shell_java_resources") {
  resource_dirs = [ "java/res" ]
  custom_package = "org.chromium.content_shell"
}

android_library("content_shell_java") {
  deps = [
    "//base:base_java",
    "//content/public/android:content_java",
    "//media/base/android:media_java",
    "//net/android:net_java",
    "//ui/android:ui_java",
    ":content_shell_java_resources",
  ]
  DEPRECATED_java_in_dir = "java/src"
}

android_resources("content_shell_apk_resources") {
  resource_dirs = [ "shell_apk/res" ]
  deps = [
    ":content_shell_java_resources"
  ]
  android_manifest = "shell_apk/AndroidManifest.xml"
}

android_library("content_shell_apk_java") {
  deps = [
    ":content_shell_apk_resources",
    ":content_shell_java",
    "//base:base_java",
    "//content/public/android:content_java",
    "//media/base/android:media_java",
    "//net/android:net_java",
    "//ui/android:ui_java",
  ]
  DEPRECATED_java_in_dir = "shell_apk/src"
}

android_apk("content_shell_apk") {
  datadeps = [
    # "//tools/android/forwarder",
  ]
  deps = [
    ":content_shell_apk_resources",
    ":content_shell_java",
    ":content_shell_apk_java",
    ":libcontent_shell_content_view",
    "//base:base_java",
    "//content/public/android:content_java",
    "//content/public/android:content_java_resources",
    "//media/base/android:media_java",
    "//net/android:net_java",
    #"//third_party/mesa:osmesa_in_lib_dir",
    "//ui/android:ui_java",
  ]
  apk_name = "ContentShell"
  android_manifest = "shell_apk/AndroidManifest.xml"
  native_libs = [
    "$root_build_dir/lib.stripped/libcontent_shell_content_view.so"
  ]
  asset_location = "$root_build_dir/content_shell/assets"

  # TODO(GYP)
  #'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
  #'extra_native_libs': ['<(SHARED_LIB_DIR)/libosmesa.so'],

  if (false && icu_use_data_file_flag) {
    # TODO(GYP)
  }

  if (is_android_webview_build) {
    # TODO(GYP)
  }
}

android_library("content_shell_test_java") {
  deps = [
    ":content_shell_java",
    ":content_shell_apk_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//content/public/test/android:content_java_test_support",
    "//content/shell/android:content_shell_java",
    "//content/public/android:content_java",
  ]
  DEPRECATED_java_in_dir = "javatests/src"
}

android_apk("content_shell_test_apk") {
  deps = [
    "//content/public/android:content_javatests",
    "//base:base_javatests",
    "//net/android:net_javatests",
  ]
  apk_name = "ContentShellTest"
  android_manifest = "javatests/AndroidManifest.xml"
}