1 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 import("//build/config/android/config.gni") 6 import("//build/config/android/rules.gni") 7 import("//third_party/icu/config.gni") 8 9 generate_jni("content_shell_jni_headers") { 10 jni_package = "content/shell" 11 sources = [ 12 "browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java", 13 "java/src/org/chromium/content_shell/ShellLayoutTestUtils.java", 14 "java/src/org/chromium/content_shell/ShellManager.java", 15 "java/src/org/chromium/content_shell/Shell.java", 16 ] 17 } 18 19 shared_library("libcontent_shell_content_view") { 20 testonly = true 21 deps = [ 22 ":content_shell_jni_headers", 23 "//content/shell:content_shell_lib", 24 "//content/shell:pak", 25 "//components/crash/browser", 26 "//skia", 27 "//media/base/android", 28 ] 29 sources = [ 30 "shell_library_loader.cc", 31 "shell_library_loader.h", 32 ] 33 if (is_android_webview_build) { 34 ldflags = [ 35 "-lgabi++", 36 ] 37 } 38 } 39 40 android_resources("content_shell_java_resources") { 41 testonly = true 42 resource_dirs = [ "java/res" ] 43 custom_package = "org.chromium.content_shell" 44 } 45 46 android_library("content_shell_java") { 47 testonly = true 48 deps = [ 49 "//base:base_java", 50 "//content/public/android:content_java", 51 "//media/base/android:media_java", 52 "//net/android:net_java", 53 "//ui/android:ui_java", 54 ":content_shell_java_resources", 55 ] 56 DEPRECATED_java_in_dir = "java/src" 57 } 58 59 android_resources("content_shell_apk_resources") { 60 testonly = true 61 resource_dirs = [ "shell_apk/res" ] 62 deps = [ 63 ":content_shell_java_resources" 64 ] 65 android_manifest = "shell_apk/AndroidManifest.xml" 66 } 67 68 android_library("content_shell_apk_java") { 69 testonly = true 70 deps = [ 71 ":content_shell_apk_resources", 72 ":content_shell_java", 73 "//base:base_java", 74 "//content/public/android:content_java", 75 "//media/base/android:media_java", 76 "//net/android:net_java", 77 "//ui/android:ui_java", 78 ] 79 DEPRECATED_java_in_dir = "shell_apk/src" 80 } 81 82 content_shell_assets_dir = "$root_build_dir/content_shell/assets" 83 copy_ex("copy_content_shell_assets") { 84 clear_dir = true 85 dest = content_shell_assets_dir 86 sources = [ 87 "$root_out_dir/content_shell.pak" 88 ] 89 90 if (icu_use_data_file) { 91 sources += [ 92 "$root_build_dir/icudtl.dat" 93 ] 94 } 95 } 96 97 android_apk("content_shell_apk") { 98 testonly = true 99 datadeps = [ 100 # "//tools/android/forwarder", 101 ] 102 deps = [ 103 ":content_shell_apk_resources", 104 ":content_shell_java", 105 ":content_shell_apk_java", 106 ":libcontent_shell_content_view", 107 ":copy_content_shell_assets", 108 "//base:base_java", 109 "//content/public/android:content_java", 110 "//media/base/android:media_java", 111 "//net/android:net_java", 112 #"//third_party/mesa:osmesa_in_lib_dir", 113 "//ui/android:ui_java", 114 ] 115 apk_name = "ContentShell" 116 android_manifest = "shell_apk/AndroidManifest.xml" 117 native_libs = [ 118 "$root_build_dir/lib.stripped/libcontent_shell_content_view.so" 119 ] 120 asset_location = content_shell_assets_dir 121 122 # TODO(GYP) 123 #'extra_native_libs': ['<(SHARED_LIB_DIR)/libosmesa.so'], 124 125 if (is_android_webview_build) { 126 # TODO(GYP) 127 } 128 } 129 130 android_library("content_shell_test_java") { 131 testonly = true 132 deps = [ 133 ":content_shell_java", 134 ":content_shell_apk_java", 135 "//base:base_java", 136 "//base:base_java_test_support", 137 "//content/public/test/android:content_java_test_support", 138 "//content/shell/android:content_shell_java", 139 "//content/public/android:content_java", 140 ] 141 DEPRECATED_java_in_dir = "javatests/src" 142 } 143 144 android_apk("content_shell_test_apk") { 145 testonly = true 146 deps = [ 147 "//content/public/android:content_javatests", 148 "//base:base_javatests", 149 "//net/android:net_javatests", 150 ] 151 datadeps = [ 152 ":content_shell_apk", 153 ] 154 apk_name = "ContentShellTest" 155 android_manifest = "javatests/AndroidManifest.xml" 156 } 157