Commit 11a68cbf authored by cjhopman's avatar cjhopman Committed by Commit bot

Make chrome_shell_apk build

This mostly just adds the chrome_shell_apk build definition and those of
a whole bunch of targets.

Adds a simple check that when DEPRECATED_java_in_dir is used, it
actually includes the "src" at the end (GYP just assumes that you really
meant that java files are in <(java_in_dir)/src).

Makes the call to process_resources only generate R.java for extra
packages when being run as part of the apk step (otherwise, for
example, both chrome resources and content resources would contain
an R.java for net resources and compilation would fail).

Depends on https://codereview.chromium.org/581273004/

Adds the following targets -- and enables ~300 more (550 counting
template-generated inner targets):

//chrome:chrome_android_core
//chrome/android:chrome_strings_grd
//chrome/android:chrome_java
//chrome/android:activity_type_ids_javagen
//chrome/android:app_banner_metrics_ids_javagen
//chrome/android:resource_id_javagen
//chrome/android:profile_account_management_metrics_javagen
//chrome/android:profile_sync_service_model_type_selection_javagen
//chrome/android:toolbar_model_security_levels_javagen
//chrome/android:tab_load_status_javagen
//chrome/android:chrome_shell_base
//chrome/android:chrome_shell
//chrome/android:chrome_sync_shell
//chrome/android:chrome_shell_resources
//chrome/android:chrome_shell_java
//chrome/android:chrome_shell_assets
//chrome/android:chrome_shell_apk
//chrome/android:chrome_sync_shell_apk
//components/bookmarks:bookmarks_java
//components/bookmarks:bookmarks_jni_headers
//components/bookmarks:bookmark_type_javagen
//components/dom_distiller/android:dom_distiller_core_java
//components/dom_distiller/android:dom_distiller_core_font_family_javagen
//components/dom_distiller/android:dom_distiller_core_theme_javagen
//components/enhanced_bookmarks:jni_headers
//components/enhanced_bookmarks/android:enhanced_bookmarks_java
//components/gcm_driver:gcm_driver_java
//components/gcm_driver:jni_headers
//components/navigation_interception/android:navigation_interception_java
//components/variations:variations_java
//components/web_contents_delegate_android:web_contents_delegate_android
//components/web_contents_delegate_android:web_contents_delegate_android_java
//components/web_contents_delegate_android:web_contents_delegate_android_jni_headers
//printing:printing_java
//sync:fake_server_jni
//sync:sync_java_test_support
//sync:test_support_sync_fake_server_android
//sync:sync_unit_tests_apk
//sync/android:sync_java
//sync/android:sync_javatests

BUG=359249
TBR=ben

Review URL: https://codereview.chromium.org/570203002

Cr-Commit-Position: refs/heads/master@{#299381}
parent 93bce7ec
...@@ -168,6 +168,7 @@ group("root") { ...@@ -168,6 +168,7 @@ group("root") {
deps += [ deps += [
"//third_party/openmax_dl/dl", "//third_party/openmax_dl/dl",
"//content/shell/android:content_shell_apk", "//content/shell/android:content_shell_apk",
"//chrome/android:chrome_shell_apk",
"//ui/android:ui_java", "//ui/android:ui_java",
"//third_party/android_tools:android_gcm_java", "//third_party/android_tools:android_gcm_java",
"//third_party/android_tools:uiautomator_java", "//third_party/android_tools:uiautomator_java",
......
...@@ -171,6 +171,9 @@ def main(argv): ...@@ -171,6 +171,9 @@ def main(argv):
config['resources'] = {} config['resources'] = {}
config['resources']['dependency_zips'] = [ config['resources']['dependency_zips'] = [
c['resources_zip'] for c in all_resources_deps] c['resources_zip'] for c in all_resources_deps]
config['resources']['extra_package_names'] = []
if options.type == 'android_apk':
config['resources']['extra_package_names'] = [ config['resources']['extra_package_names'] = [
c['package_name'] for c in all_resources_deps if 'package_name' in c] c['package_name'] for c in all_resources_deps if 'package_name' in c]
......
...@@ -63,6 +63,7 @@ if (is_android) { ...@@ -63,6 +63,7 @@ if (is_android) {
# Path to the Android NDK and SDK. # Path to the Android NDK and SDK.
android_ndk_root = "//third_party/android_tools/ndk" android_ndk_root = "//third_party/android_tools/ndk"
android_ndk_include_dir = "$android_ndk_root/usr/include"
android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}" android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}"
......
...@@ -85,11 +85,6 @@ template("write_build_config") { ...@@ -85,11 +85,6 @@ template("write_build_config") {
deps += invoker.deps deps += invoker.deps
} }
outputs = [
depfile,
build_config
]
possible_deps_configs = [] possible_deps_configs = []
foreach(d, deps) { foreach(d, deps) {
dep_gen_dir = get_label_info(d, "target_gen_dir") dep_gen_dir = get_label_info(d, "target_gen_dir")
...@@ -98,6 +93,11 @@ template("write_build_config") { ...@@ -98,6 +93,11 @@ template("write_build_config") {
} }
rebase_possible_deps_configs = rebase_path(possible_deps_configs) rebase_possible_deps_configs = rebase_path(possible_deps_configs)
outputs = [
depfile,
build_config
]
args = [ args = [
"--type", type, "--type", type,
"--depfile", rebase_path(depfile, root_build_dir), "--depfile", rebase_path(depfile, root_build_dir),
...@@ -565,6 +565,14 @@ template("android_java_library") { ...@@ -565,6 +565,14 @@ template("android_java_library") {
if (defined(invoker.java_files)) { if (defined(invoker.java_files)) {
_java_files = invoker.java_files _java_files = invoker.java_files
} else if (defined(invoker.DEPRECATED_java_in_dir)) { } else if (defined(invoker.DEPRECATED_java_in_dir)) {
_src_dir = invoker.DEPRECATED_java_in_dir + "/src"
_src_dir_exists = exec_script("//build/dir_exists.py",
[ rebase_path(_src_dir, root_build_dir) ],
"string")
assert(_src_dir_exists == "False",
"In GN, java_in_dir should be the fully specified java directory " +
"(i.e. including the trailing \"/src\")")
_java_files_build_rel = exec_script( _java_files_build_rel = exec_script(
"//build/android/gyp/find.py", "//build/android/gyp/find.py",
[ [
...@@ -718,10 +726,9 @@ template("copy_ex") { ...@@ -718,10 +726,9 @@ template("copy_ex") {
action(target_name) { action(target_name) {
script = "//build/android/gyp/copy_ex.py" script = "//build/android/gyp/copy_ex.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [ if (defined(invoker.deps)) { deps = invoker.deps }
depfile,
]
sources = [] sources = []
if (defined(invoker.sources)) { if (defined(invoker.sources)) {
sources += invoker.sources sources += invoker.sources
...@@ -732,18 +739,24 @@ template("copy_ex") { ...@@ -732,18 +739,24 @@ template("copy_ex") {
inputs += invoker.inputs inputs += invoker.inputs
} }
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
]
args = [ args = [
"--depfile", rebase_path(depfile, root_build_dir), "--depfile", rebase_path(depfile, root_build_dir),
"--dest", rebase_path(invoker.dest, root_build_dir), "--dest", rebase_path(invoker.dest, root_build_dir),
] ]
if (defined(invoker.args)) {
args += invoker.args
}
rebased_sources = rebase_path(sources, root_build_dir) rebased_sources = rebase_path(sources, root_build_dir)
args += [ "--files=$rebased_sources" ] args += [ "--files=$rebased_sources" ]
if (defined(invoker.clear_dir) && invoker.clear_dir) { if (defined(invoker.clear_dir) && invoker.clear_dir) {
args += ["--clear"] args += ["--clear"]
} }
if (defined(invoker.args)) {
args += invoker.args
}
} }
} }
...@@ -34,8 +34,9 @@ template("generate_jni") { ...@@ -34,8 +34,9 @@ template("generate_jni") {
assert(defined(invoker.sources)) assert(defined(invoker.sources))
assert(defined(invoker.jni_package)) assert(defined(invoker.jni_package))
jni_package = invoker.jni_package jni_package = invoker.jni_package
base_output_dir = "${root_gen_dir}/${target_name}/${jni_package}" base_output_dir = "${target_gen_dir}/${target_name}"
jni_output_dir = "${base_output_dir}/jni" package_output_dir = "${base_output_dir}/${jni_package}"
jni_output_dir = "${package_output_dir}/jni"
jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h" jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h"
...@@ -66,7 +67,13 @@ template("generate_jni") { ...@@ -66,7 +67,13 @@ template("generate_jni") {
} }
config("jni_includes_${target_name}") { config("jni_includes_${target_name}") {
include_dirs = [ base_output_dir ] # TODO(cjhopman): #includes should probably all be relative to
# base_output_dir. Remove that from this config once the includes are
# updated.
include_dirs = [
base_output_dir,
package_output_dir,
]
} }
group(target_name) { group(target_name) {
...@@ -79,6 +86,8 @@ template("generate_jni") { ...@@ -79,6 +86,8 @@ template("generate_jni") {
if (defined(invoker.public_deps)) { if (defined(invoker.public_deps)) {
public_deps = invoker.public_deps public_deps = invoker.public_deps
} }
if (defined(invoker.visibility)) { visibility = invoker.visibility }
} }
} }
...@@ -982,8 +991,9 @@ template("unittest_apk") { ...@@ -982,8 +991,9 @@ template("unittest_apk") {
android_manifest = "//testing/android/java/AndroidManifest.xml" android_manifest = "//testing/android/java/AndroidManifest.xml"
unittests_outputs = [ unittests_binary ] unittests_outputs = [ unittests_binary ]
native_libs = [unittests_outputs[0]] native_libs = [unittests_outputs[0]]
deps = [ "//base:base_java" ]
if (defined(invoker.deps)) { if (defined(invoker.deps)) {
deps = invoker.deps deps += invoker.deps
} }
datadeps = [ datadeps = [
"//tools/android/md5sum", "//tools/android/md5sum",
......
...@@ -8,6 +8,10 @@ import("//build/config/ui.gni") ...@@ -8,6 +8,10 @@ import("//build/config/ui.gni")
import("//chrome/chrome_repack_locales.gni") import("//chrome/chrome_repack_locales.gni")
import("//chrome/version.gni") import("//chrome/version.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
if (!is_android) { if (!is_android) {
# TODO(GYP) for Windows need to the the reorder-imports step which probably # TODO(GYP) for Windows need to the the reorder-imports step which probably
...@@ -322,7 +326,7 @@ group("packed_resources") { ...@@ -322,7 +326,7 @@ group("packed_resources") {
} }
repack("packed_extra_resources") { repack("packed_extra_resources") {
visibility = [ ":*" ] visibility = [ "./*" ]
sources = [ sources = [
"$root_gen_dir/chrome/browser_resources.pak", "$root_gen_dir/chrome/browser_resources.pak",
"$root_gen_dir/chrome/chrome_unscaled_resources.pak", "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
...@@ -522,3 +526,48 @@ group("strings") { ...@@ -522,3 +526,48 @@ group("strings") {
"//chrome/app/resources:locale_settings", "//chrome/app/resources:locale_settings",
] ]
} }
if (is_android) {
# GYP: //chrome/chrome.gyp:page_info_connection_type_java
java_cpp_enum("page_info_connection_type_javagen") {
sources = [
"browser/ui/android/website_settings_popup_android.h"
]
outputs = [
"org/chromium/chrome/browser/PageInfoConnectionType.java",
]
}
# GYP: //chrome/chrome_android.gypi:chrome_android_core
static_library("chrome_android_core") {
sources = [
"app/android/chrome_android_initializer.cc",
"app/android/chrome_android_initializer.h",
"app/android/chrome_main_delegate_android.cc",
"app/android/chrome_main_delegate_android.h",
"app/chrome_main_delegate.cc",
"app/chrome_main_delegate.h",
]
include_dirs = [
android_ndk_include_dir,
]
libs = [
"android",
"jnigraphics",
]
deps = [
"//chrome/browser",
"//chrome/browser/ui",
"//chrome/plugin",
"//chrome/renderer",
"//chrome/utility",
"//components/enhanced_bookmarks",
"//content/public/app:browser",
]
}
}
This diff is collapsed.
...@@ -306,46 +306,45 @@ public class ChromeShellActivity extends Activity implements AppMenuPropertiesDe ...@@ -306,46 +306,45 @@ public class ChromeShellActivity extends Activity implements AppMenuPropertiesDe
containerView.requestFocus(); containerView.requestFocus();
} }
} }
switch (item.getItemId()) { int id = item.getItemId();
case R.id.signin: if (id == R.id.signin) {
if (ChromeSigninController.get(this).isSignedIn()) { if (ChromeSigninController.get(this).isSignedIn()) {
SyncController.openSignOutDialog(getFragmentManager()); SyncController.openSignOutDialog(getFragmentManager());
} else if (AccountManagerHelper.get(this).hasGoogleAccounts()) { } else if (AccountManagerHelper.get(this).hasGoogleAccounts()) {
SyncController.openSigninDialog(getFragmentManager()); SyncController.openSigninDialog(getFragmentManager());
} else { } else {
Toast.makeText(this, R.string.signin_no_account, Toast.LENGTH_SHORT).show(); Toast.makeText(this, R.string.signin_no_account, Toast.LENGTH_SHORT).show();
} }
return true; return true;
case R.id.print: } else if (id == R.id.print) {
if (activeTab != null) { if (activeTab != null) {
mPrintingController.startPrint(new TabPrinter(activeTab), mPrintingController.startPrint(new TabPrinter(activeTab),
new PrintManagerDelegateImpl(this)); new PrintManagerDelegateImpl(this));
} }
return true; return true;
case R.id.distill_page: } else if (id == R.id.distill_page) {
if (activeTab != null) { if (activeTab != null) {
DomDistillerTabUtils.distillCurrentPageAndView( DomDistillerTabUtils.distillCurrentPageAndView(
activeTab.getContentViewCore().getWebContents()); activeTab.getContentViewCore().getWebContents());
} }
return true; return true;
case R.id.back_menu_id: } else if (id == R.id.back_menu_id) {
if (activeTab != null && activeTab.canGoBack()) { if (activeTab != null && activeTab.canGoBack()) {
activeTab.goBack(); activeTab.goBack();
} }
return true; return true;
case R.id.forward_menu_id: } else if (id == R.id.forward_menu_id) {
if (activeTab != null && activeTab.canGoForward()) { if (activeTab != null && activeTab.canGoForward()) {
activeTab.goForward(); activeTab.goForward();
} }
return true; return true;
case R.id.share_menu_id: } else if (id == R.id.share_menu_id || id == R.id.direct_share_menu_id) {
case R.id.direct_share_menu_id: ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, this,
ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, this, activeTab.getTitle(), activeTab.getUrl(), null,
activeTab.getTitle(), activeTab.getUrl(), null, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); return true;
return true; } else {
default: return super.onOptionsItemSelected(item);
return super.onOptionsItemSelected(item);
} }
} }
......
...@@ -440,11 +440,16 @@ source_set("test_support") { ...@@ -440,11 +440,16 @@ source_set("test_support") {
"pdf/pdf_browsertest_base.h", "pdf/pdf_browsertest_base.h",
"test/test_confirm_bubble_model.cc", "test/test_confirm_bubble_model.cc",
"test/test_confirm_bubble_model.h", "test/test_confirm_bubble_model.h",
"views/find_bar_host_unittest_util_views.cc",
"website_settings/mock_permission_bubble_request.cc", "website_settings/mock_permission_bubble_request.cc",
"website_settings/mock_permission_bubble_request.h", "website_settings/mock_permission_bubble_request.h",
] ]
if (toolkit_views) {
sources += [
"views/find_bar_host_unittest_util_views.cc",
]
}
public_deps = [ public_deps = [
":ui", ":ui",
] ]
......
...@@ -577,6 +577,7 @@ ...@@ -577,6 +577,7 @@
{ {
'targets': [ 'targets': [
{ {
# GN: //chrome/android:chrome_java
'target_name': 'chrome_java', 'target_name': 'chrome_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -597,7 +598,6 @@ ...@@ -597,7 +598,6 @@
'../components/components.gyp:gcm_driver_java', '../components/components.gyp:gcm_driver_java',
'../components/components.gyp:invalidation_java', '../components/components.gyp:invalidation_java',
'../components/components.gyp:navigation_interception_java', '../components/components.gyp:navigation_interception_java',
'../components/components.gyp:sessions',
'../components/components.gyp:variations_java', '../components/components.gyp:variations_java',
'../components/components.gyp:web_contents_delegate_android_java', '../components/components.gyp:web_contents_delegate_android_java',
'../content/content.gyp:content_java', '../content/content.gyp:content_java',
...@@ -621,6 +621,7 @@ ...@@ -621,6 +621,7 @@
], ],
}, },
{ {
# GN: //chrome/android:chrome_strings_grd
'target_name': 'chrome_strings_grd', 'target_name': 'chrome_strings_grd',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
...@@ -631,6 +632,7 @@ ...@@ -631,6 +632,7 @@
], ],
}, },
{ {
# GN: //chrome:page_info_connection_type_javagen
'target_name': 'page_info_connection_type_java', 'target_name': 'page_info_connection_type_java',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
], ],
'targets': [ 'targets': [
{ {
# GN: //chrome:chrome_android_core
'target_name': 'chrome_android_core', 'target_name': 'chrome_android_core',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
}, },
}, },
{ {
# GYP: //chrome/android:chrome_version_java
'target_name': 'chrome_version_java', 'target_name': 'chrome_version_java',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
......
...@@ -3493,6 +3493,7 @@ ...@@ -3493,6 +3493,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN: //chrome/browser:jni_headers
'target_name': 'chrome_browser_jni_headers', 'target_name': 'chrome_browser_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ '<@(chrome_browser_jni_sources)' ], 'sources': [ '<@(chrome_browser_jni_sources)' ],
...@@ -3502,6 +3503,7 @@ ...@@ -3502,6 +3503,7 @@
'includes': [ '../build/jni_generator.gypi' ], 'includes': [ '../build/jni_generator.gypi' ],
}, },
{ {
# GN: //chrome/android:activity_type_ids_javagen
'target_name': 'activity_type_ids_java', 'target_name': 'activity_type_ids_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3514,6 +3516,7 @@ ...@@ -3514,6 +3516,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android:app_banner_metrics_ids_javagen
'target_name': 'app_banner_metrics_ids_java', 'target_name': 'app_banner_metrics_ids_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3526,6 +3529,7 @@ ...@@ -3526,6 +3529,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android:resource_id_javagen
'target_name': 'resource_id_java', 'target_name': 'resource_id_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3538,6 +3542,7 @@ ...@@ -3538,6 +3542,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android/profile_account_management_metrics_javagen
'target_name': 'profile_account_management_metrics_java', 'target_name': 'profile_account_management_metrics_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3550,6 +3555,7 @@ ...@@ -3550,6 +3555,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android:profile_sync_service_model_type_selection_javagen
'target_name': 'profile_sync_service_model_type_selection_java', 'target_name': 'profile_sync_service_model_type_selection_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3562,6 +3568,7 @@ ...@@ -3562,6 +3568,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android:toolbar_model_security_levels_javagen
'target_name': 'toolbar_model_security_levels_java', 'target_name': 'toolbar_model_security_levels_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -3574,6 +3581,7 @@ ...@@ -3574,6 +3581,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //chrome/android:tab_load_status_javagen
'target_name': 'tab_load_status_java', 'target_name': 'tab_load_status_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
}, },
'targets': [ 'targets': [
{ {
# GN: //chrome/android:chrome_shell_base
'target_name': 'libchromeshell_base', 'target_name': 'libchromeshell_base',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
], ],
}, },
{ {
# GN: //chrome/android:chrome_shell
'target_name': 'libchromeshell', 'target_name': 'libchromeshell',
'type': 'shared_library', 'type': 'shared_library',
'sources': [ 'sources': [
...@@ -65,6 +67,7 @@ ...@@ -65,6 +67,7 @@
], ],
}, },
{ {
# GN: //chrome/android:chrome_sync_shell
'target_name': 'libchromesyncshell', 'target_name': 'libchromesyncshell',
'type': 'shared_library', 'type': 'shared_library',
'sources': [ 'sources': [
...@@ -80,6 +83,7 @@ ...@@ -80,6 +83,7 @@
], ],
}, },
{ {
# GN: //chrome/android:chrome_shell_apk
'target_name': 'chrome_shell_apk', 'target_name': 'chrome_shell_apk',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -102,6 +106,7 @@ ...@@ -102,6 +106,7 @@
'includes': [ '../build/java_apk.gypi', ], 'includes': [ '../build/java_apk.gypi', ],
}, },
{ {
# GN: N/A
# chrome_shell_apk creates a .jar as a side effect. Any java targets # chrome_shell_apk creates a .jar as a side effect. Any java targets
# that need that .jar in their classpath should depend on this target, # that need that .jar in their classpath should depend on this target,
# chrome_shell_apk_java. Dependents of chrome_shell_apk receive its # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
...@@ -132,6 +137,7 @@ ...@@ -132,6 +137,7 @@
], ],
}, },
{ {
# GN: //chrome/android:chrome_sync_shell_apk
'target_name': 'chrome_sync_shell_apk', 'target_name': 'chrome_sync_shell_apk',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -157,6 +163,7 @@ ...@@ -157,6 +163,7 @@
'includes': [ '../build/java_apk.gypi', ], 'includes': [ '../build/java_apk.gypi', ],
}, },
{ {
# GN: N/A
# chrome_sync_shell_apk creates a .jar as a side effect. Any java # chrome_sync_shell_apk creates a .jar as a side effect. Any java
# targets that need that .jar in their classpath should depend on this # targets that need that .jar in their classpath should depend on this
# target. Dependents of chrome_sync_shell_apk receive its jar path in the # target. Dependents of chrome_sync_shell_apk receive its jar path in the
......
...@@ -62,6 +62,8 @@ static_library("common") { ...@@ -62,6 +62,8 @@ static_library("common") {
"//components/variations", "//components/variations",
"//content/public/common", "//content/public/common",
"//crypto", "//crypto",
"//extensions:extensions_resources",
"//extensions/strings",
"//media/cast:net", "//media/cast:net",
"//net", "//net",
"//skia", "//skia",
...@@ -104,8 +106,6 @@ static_library("common") { ...@@ -104,8 +106,6 @@ static_library("common") {
"//chrome/common/extensions/api", "//chrome/common/extensions/api",
"//extensions/common", "//extensions/common",
"//extensions/common/api", "//extensions/common/api",
"//extensions/strings",
"//extensions:extensions_resources",
] ]
} }
...@@ -173,7 +173,6 @@ static_library("common") { ...@@ -173,7 +173,6 @@ static_library("common") {
sources -= [ sources -= [
"badge_util.cc", "badge_util.cc",
"chrome_version_info_posix.cc", "chrome_version_info_posix.cc",
"extensions/manifest_handlers/minimum_chrome_version_checker.cc",
"icon_with_badge_image_source.cc", "icon_with_badge_image_source.cc",
"media_galleries/metadata_types.h", "media_galleries/metadata_types.h",
"spellcheck_common.cc", "spellcheck_common.cc",
......
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN: //components/common/android:bookmarks_java
'target_name': 'bookmarks_java', 'target_name': 'bookmarks_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -137,6 +138,7 @@ ...@@ -137,6 +138,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN: //components/common/android:bookmarks_jni_headers
'target_name': 'bookmarks_jni_headers', 'target_name': 'bookmarks_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -148,6 +150,7 @@ ...@@ -148,6 +150,7 @@
'includes': [ '../build/jni_generator.gypi' ], 'includes': [ '../build/jni_generator.gypi' ],
}, },
{ {
# GN: //components/common/android:bookmarks_type_javagen
'target_name': 'bookmark_type_java', 'target_name': 'bookmark_type_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
# 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/rules.gni")
# GYP: //components/bookmarks.gyp:bookmarks_java
android_library("bookmarks_java") {
deps = [
"//base:base_java",
]
srcjar_deps = [
":bookmark_type_javagen",
]
DEPRECATED_java_in_dir = "java/src"
}
# GYP: //components/bookmarks.gyp:bookmarks_jni_headers
generate_jni("bookmarks_jni_headers") {
jni_package = "components/bookmarks"
sources = [
"java/src/org/chromium/components/bookmarks/BookmarkId.java"
]
}
# GYP: //components/bookmarks.gyp:bookmarks_type_java
java_cpp_template("bookmark_type_javagen") {
sources = [
"java/src/org/chromium/components/bookmarks/BookmarkType.template",
]
package_name = "org/chromium/components/bookmarks"
inputs = [
"bookmark_type_list.h",
]
}
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN: //components/dom_distiller/android:dom_distiller_core_java
'target_name': 'dom_distiller_core_java', 'target_name': 'dom_distiller_core_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -188,6 +189,7 @@ ...@@ -188,6 +189,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN: //components/dom_distiller/android:dom_distiller_core_font_family_javagen
'target_name': 'dom_distiller_core_font_family_java', 'target_name': 'dom_distiller_core_font_family_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -200,6 +202,7 @@ ...@@ -200,6 +202,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ], 'includes': [ '../build/android/java_cpp_template.gypi' ],
}, },
{ {
# GN: //components/dom_distiller/core:jni_headers
'target_name': 'dom_distiller_core_jni_headers', 'target_name': 'dom_distiller_core_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -213,6 +216,7 @@ ...@@ -213,6 +216,7 @@
'includes': [ '../build/jni_generator.gypi' ], 'includes': [ '../build/jni_generator.gypi' ],
}, },
{ {
# GN: //components/dom_distiller/android:dom_distiller_core_theme_javagen
'target_name': 'dom_distiller_core_theme_java', 'target_name': 'dom_distiller_core_theme_java',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
# 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/rules.gni")
# GYP: //components/dom_distiller.gypi:dom_distiller_core_java
android_library("dom_distiller_core_java") {
deps = [
"//base:base_java",
]
srcjar_deps = [
":dom_distiller_core_font_family_javagen",
":dom_distiller_core_theme_javagen",
]
DEPRECATED_java_in_dir = "java/src"
}
# GYP: //components/dom_distiller.gypi:dom_distiller_core_font_family_java
java_cpp_template("dom_distiller_core_font_family_javagen") {
package_name = "org/chromium/components/dom_distiller/core"
sources = [
"java/src/org/chromium/components/dom_distiller/core/FontFamily.template"
]
inputs = [
"../core/font_family_list.h"
]
}
# GYP: //components/dom_distiller.gypi:dom_distiller_core_font_family_java
java_cpp_template("dom_distiller_core_theme_javagen") {
package_name = "org/chromium/components/dom_distiller/core"
sources = [
"java/src/org/chromium/components/dom_distiller/core/Theme.template"
]
inputs = [
"../core/theme_list.h"
]
}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
{ {
'targets': [ 'targets': [
{ {
# GN: //components/enhanced_bookmarks:enhanced_bookmarks
'target_name': 'enhanced_bookmarks', 'target_name': 'enhanced_bookmarks',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ 'include_dirs': [
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
], ],
}, },
{ {
# GN: //components/enhanced_bookmarks:enhanced_bookmarks_test_support
'target_name': 'enhanced_bookmarks_test_support', 'target_name': 'enhanced_bookmarks_test_support',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ 'include_dirs': [
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# GYP: //components/enhanced_bookmarks.gypi:enhanced_bookmarks
source_set("enhanced_bookmarks") { source_set("enhanced_bookmarks") {
sources = [ sources = [
"bookmark_image_service.cc", "bookmark_image_service.cc",
...@@ -48,6 +49,7 @@ source_set("enhanced_bookmarks") { ...@@ -48,6 +49,7 @@ source_set("enhanced_bookmarks") {
} }
} }
# GYP: //components/enhanced_bookmarks.gypi:enhanced_bookmarks_test_support
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
sources = [ sources = [
......
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
['OS == "android"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
# GN version: //components/gcm_driver/android:gcm_driver_java
'target_name': 'gcm_driver_java', 'target_name': 'gcm_driver_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -149,7 +150,7 @@ ...@@ -149,7 +150,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN version: //components/gcm_driver:jni_headers # GN version: //components/gcm_driver/android:jni_headers
'target_name': 'gcm_driver_jni_headers', 'target_name': 'gcm_driver_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
...@@ -71,10 +71,9 @@ static_library("gcm_driver") { ...@@ -71,10 +71,9 @@ static_library("gcm_driver") {
"gcm_stats_recorder_impl.h", "gcm_stats_recorder_impl.h",
] ]
deps -= [ deps -= [
"//components/gcm_driver/proto",
"//google_apis/gcm", "//google_apis/gcm",
] ]
deps += [ ":jni_headers" ] deps += [ "android:jni_headers" ]
} }
} }
...@@ -108,15 +107,3 @@ static_library("test_support") { ...@@ -108,15 +107,3 @@ static_library("test_support") {
deps -= [ "//google_apis/gcm" ] deps -= [ "//google_apis/gcm" ]
} }
} }
if (is_android) {
import("//build/config/android/rules.gni")
# GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers
generate_jni("jni_headers") {
sources = [
"android/java/src/org/chromium/components/gcm_driver/GCMDriver.java",
]
jni_package = "components/gcm_driver"
}
}
# 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/rules.gni")
# GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/components/gcm_driver/GCMDriver.java",
]
jni_package = "components/gcm_driver"
}
# GYP version: components/gcm_driver.gypi:gcm_driver_java
android_library("gcm_driver_java") {
deps = [
"//base:base_java",
"//content/public/android:content_java",
"//sync/android:sync_java",
"//third_party/android_tools:android_gcm_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
]
DEPRECATED_java_in_dir = "java/src"
}
...@@ -78,15 +78,6 @@ static_library("invalidation") { ...@@ -78,15 +78,6 @@ static_library("invalidation") {
"ticl_settings_provider.h", "ticl_settings_provider.h",
] ]
} }
if (is_android) {
sources += [
"android/component_jni_registrar.cc",
"android/component_jni_registrar.h",
"invalidation_service_android.cc",
"invalidation_service_android.h",
]
deps += [ ":jni_headers" ]
}
public_deps = [ public_deps = [
"//third_party/cacheinvalidation", "//third_party/cacheinvalidation",
...@@ -104,6 +95,16 @@ static_library("invalidation") { ...@@ -104,6 +95,16 @@ static_library("invalidation") {
"//third_party/protobuf:protobuf_lite", "//third_party/protobuf:protobuf_lite",
# "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp", # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
] ]
if (is_android) {
sources += [
"android/component_jni_registrar.cc",
"android/component_jni_registrar.h",
"invalidation_service_android.cc",
"invalidation_service_android.h",
]
deps += [ ":jni_headers" ]
}
} }
static_library("unittests") { static_library("unittests") {
...@@ -141,17 +142,7 @@ static_library("test_support") { ...@@ -141,17 +142,7 @@ static_library("test_support") {
"unacked_invalidation_set_test_util.cc", "unacked_invalidation_set_test_util.cc",
"unacked_invalidation_set_test_util.h", "unacked_invalidation_set_test_util.h",
] ]
if (!is_android) {
sources += [
"p2p_invalidation_service.cc",
"p2p_invalidation_service.h",
]
}
if (is_android) {
deps += [
":jni_headers",
]
}
deps = [ deps = [
"//base", "//base",
"//components/gcm_driver:test_support", "//components/gcm_driver:test_support",
...@@ -167,23 +158,40 @@ static_library("test_support") { ...@@ -167,23 +158,40 @@ static_library("test_support") {
"//third_party/protobuf:protobuf_lite", "//third_party/protobuf:protobuf_lite",
# "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp", # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
] ]
if (is_android) {
deps += [
":jni_headers",
]
} else {
sources += [
"p2p_invalidation_service.cc",
"p2p_invalidation_service.h",
]
}
} }
if (is_android) { if (is_android) {
static_library("java") { android_library("java") {
deps = [ deps = [
"//base", "//base:base_java",
"//sync:java", "//sync/android:sync_java",
"//third_party/cacheinvalidation:javalib", "//third_party/cacheinvalidation:cacheinvalidation_javalib",
] "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
sources = [ "//third_party/jsr-305:jsr_305_javalib",
] ]
DEPRECATED_java_in_dir = "android/java/src"
} }
static_library("javatests") { android_library("javatests") {
deps = [ deps = [
":java", ":java",
"//base:java_test_support", "//base:base_java",
"//base:base_java_test_support",
"//sync/android:sync_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",
] ]
DEPRECATED_java_in_dir = "android/javatests/src"
} }
generate_jni("jni_headers") { generate_jni("jni_headers") {
sources = [ sources = [
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN version: //components/navigation_intercaption/android:navigation_interception_java
'target_name': 'navigation_interception_java', 'target_name': 'navigation_interception_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
......
...@@ -37,8 +37,7 @@ static_library("navigation_interception") { ...@@ -37,8 +37,7 @@ static_library("navigation_interception") {
if (is_android) { if (is_android) {
# TODO(GYP): navigation_interception_java target # GYP: //components/navigation_interception.gypi:navigation_interception_jni_headers
generate_jni("jni_headers") { generate_jni("jni_headers") {
sources = [ sources = [
"android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java", "android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java",
......
# 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/rules.gni")
android_library("navigation_interception_java") {
deps = [
"//base:base_java",
]
DEPRECATED_java_in_dir = "java/src"
}
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN version: //components/variations/android:variations_java
'target_name': 'variations_java', 'target_name': 'variations_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -94,7 +95,7 @@ ...@@ -94,7 +95,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN version: //components/variations:variations_java # GN version: //components/variations:jni
'target_name': 'variations_jni_headers', 'target_name': 'variations_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
...@@ -52,6 +52,7 @@ static_library("variations") { ...@@ -52,6 +52,7 @@ static_library("variations") {
} }
if (is_android) { if (is_android) {
# GYP: //components/variations.gypi:variations_jni_headers
generate_jni("jni") { generate_jni("jni") {
sources = [ sources = [
"android/java/src/org/chromium/components/variations/VariationsAssociatedData.java", "android/java/src/org/chromium/components/variations/VariationsAssociatedData.java",
......
# 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/rules.gni")
# GYP: //components/variations.gypi:variations_java
android_library("variations_java") {
deps = [
"//base:base_java"
]
DEPRECATED_java_in_dir = "java/src"
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
['OS=="android"', { ['OS=="android"', {
'targets': [ 'targets': [
{ {
# GN: //components/web_contents_delegate_android:web_contents_delegate_android
'target_name': 'web_contents_delegate_android', 'target_name': 'web_contents_delegate_android',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
], ],
}, },
{ {
# GN: //components/web_contents_delegate_android:web_contents_delegate_android_java
'target_name': 'web_contents_delegate_android_java', 'target_name': 'web_contents_delegate_android_java',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
...@@ -49,6 +51,7 @@ ...@@ -49,6 +51,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN: //components/web_contents_delegate_android:web_contents_delegate_android_jni_headers
'target_name': 'web_contents_delegate_android_jni_headers', 'target_name': 'web_contents_delegate_android_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
......
# 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/rules.gni")
# GYP: //components/web_contents_delegate_android:web_contents_delegate_android
static_library("web_contents_delegate_android") {
sources = [
"color_chooser_android.cc",
"color_chooser_android.h",
"component_jni_registrar.cc",
"component_jni_registrar.h",
"validation_message_bubble_android.cc",
"validation_message_bubble_android.h",
"web_contents_delegate_android.cc",
"web_contents_delegate_android.h",
]
deps = [
":web_contents_delegate_android_jni_headers",
"//base",
"//content/public/browser",
"//content/public/common",
"//net",
"//skia",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
]
}
# GYP: //components/web_contents_delegate_android:web_contents_delegate_android_java
android_library("web_contents_delegate_android_java") {
deps = [
"//base:base_java",
"//ui/android:ui_java",
"//content/public/android:content_java",
"//content/public/android:content_java_resources",
]
DEPRECATED_java_in_dir = "android/java/src"
}
# GYP: //components/web_contents_delegate_android:web_contents_delegate_android_jni_headers
generate_jni("web_contents_delegate_android_jni_headers") {
sources = [
"android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java",
"android/java/src/org/chromium/components/web_contents_delegate_android/ValidationMessageBubble.java",
"android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java",
]
jni_package = "web_contents_delegate_android"
}
...@@ -16,5 +16,5 @@ android_library("content_java_test_support") { ...@@ -16,5 +16,5 @@ android_library("content_java_test_support") {
"//base:base_java_test_support", "//base:base_java_test_support",
"//content/public/android:content_java", "//content/public/android:content_java",
] ]
DEPRECATED_java_in_dir = "javatests" DEPRECATED_java_in_dir = "javatests/src"
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
assert(!is_android && !is_ios)
source_ids = "//third_party/usb_ids/usb.ids" source_ids = "//third_party/usb_ids/usb.ids"
generated_ids = "$target_gen_dir/usb_ids_gen.cc" generated_ids = "$target_gen_dir/usb_ids_gen.cc"
......
...@@ -47,13 +47,16 @@ grit("extensions_renderer_resources") { ...@@ -47,13 +47,16 @@ grit("extensions_renderer_resources") {
"extensions_renderer_resources.pak", "extensions_renderer_resources.pak",
] ]
grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir) ] grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir) ]
if (enable_extensions) {
deps = [ # TODO(GYP,cjhopman): GYP has this dependency guarded by enable_extensions==1,
"//device/serial:serial_mojo", # but I don't know how that possibly works.
] deps = [
} "//device/serial:serial_mojo",
]
} }
if (enable_extensions) {
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
sources = [ sources = [
...@@ -264,3 +267,5 @@ test("extensions_unittests") { ...@@ -264,3 +267,5 @@ test("extensions_unittests") {
} }
} }
} }
}
...@@ -232,6 +232,7 @@ if (use_cups) { ...@@ -232,6 +232,7 @@ if (use_cups) {
} }
if (is_android) { if (is_android) {
# GYP: //printing/printing.gyp:printing_jni_headers
generate_jni("printing_jni_headers") { generate_jni("printing_jni_headers") {
sources = [ sources = [
"android/java/src/org/chromium/printing/PrintingContext.java", "android/java/src/org/chromium/printing/PrintingContext.java",
...@@ -239,16 +240,11 @@ if (is_android) { ...@@ -239,16 +240,11 @@ if (is_android) {
jni_package = "printing" jni_package = "printing"
} }
# TODO(GYP) # GYP: //printing/printing.gyp:printing_java
#{ android_library("printing_java") {
# 'target_name': 'printing_java', deps = [
# 'type': 'none', "//base:base_java"
# 'variables': { ]
# 'java_in_dir': '../printing/android/java', DEPRECATED_java_in_dir = "android/java/src"
# }, }
# 'dependencies': [
# '../base/base.gyp:base_java',
# ],
# 'includes': [ '../build/java.gypi' ],
#}
} }
...@@ -292,6 +292,7 @@ ...@@ -292,6 +292,7 @@
['OS == "android"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
# GN: //printing:printing_jni_headers
'target_name': 'printing_jni_headers', 'target_name': 'printing_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -302,8 +303,9 @@ ...@@ -302,8 +303,9 @@
}, },
'includes': [ '../build/jni_generator.gypi' ], 'includes': [ '../build/jni_generator.gypi' ],
}, },
{ {
'target_name': 'printing_java', # GN: //printing:printing_java
'target_name': 'printing_java',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
'java_in_dir': '../printing/android/java', 'java_in_dir': '../printing/android/java',
...@@ -312,7 +314,7 @@ ...@@ -312,7 +314,7 @@
'../base/base.gyp:base_java', '../base/base.gyp:base_java',
], ],
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
} }
] ]
}], }],
] ]
......
...@@ -694,6 +694,8 @@ static_library("test_support_sync_fake_server") { ...@@ -694,6 +694,8 @@ static_library("test_support_sync_fake_server") {
"//sync", "//sync",
] ]
forward_dependent_configs_from = [ "//third_party/protobuf:protobuf_lite" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]
} }
...@@ -764,4 +766,49 @@ if (!is_ios) { ...@@ -764,4 +766,49 @@ if (!is_ios) {
} }
} }
#TODO(GYP): Need to port sync_android.gypi and Android test targets. if (is_android) {
import("//build/config/android/rules.gni")
# GYP: //sync/sync_tests.gypi:fake_server_jni
generate_jni("fake_server_jni") {
testonly = true
jni_package = "sync/test/fake_server"
sources = [
"//chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java"
]
}
# GYP: //sync/sync_tests.gypi:sync_java_test_support
android_library("sync_java_test_support") {
testonly = true
deps = [
"android:sync_java",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/jsr-305:jsr_305_javalib",
]
DEPRECATED_java_in_dir = "test/android/javatests/src"
}
# GYP: //sync/sync_tests.gypi:test_support_sync_fake_server_android
static_library("test_support_sync_fake_server_android") {
testonly = true
sources = [
"test/fake_server/android/fake_server_helper_android.cc",
"test/fake_server/android/fake_server_helper_android.h",
]
deps = [
":fake_server_jni",
":test_support_sync_fake_server",
"//base",
]
}
# GYP: //sync/sync_tests.gypi:sync_unit_tests_apk
unittest_apk("sync_unit_tests_apk") {
unittests_dep = ":sync_unit_tests"
deps = [
":sync_unit_tests",
]
}
}
# 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/rules.gni")
android_library("sync_java") {
deps = [
"//base:base_java",
"//net/android:net_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",
"//third_party/jsr-305:jsr_305_javalib",
"//third_party/android_tools:android_gcm_java",
]
DEPRECATED_java_in_dir = "java/src"
}
android_library("sync_javatests") {
testonly = true
deps = [
":sync_java",
"//base:base_java",
"//base:base_java_test_support",
"//sync:sync_java_test_support",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",
"//third_party/jsr-305:jsr_305_javalib",
]
DEPRECATED_java_in_dir = "javatests/src"
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
['OS == "android"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
# GN: //sync/android:sync_java
'target_name': 'sync_java', 'target_name': 'sync_java',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
......
...@@ -426,6 +426,7 @@ ...@@ -426,6 +426,7 @@
['OS == "android"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
# GN: //sync/android:sync_javatests
'target_name': 'sync_javatests', 'target_name': 'sync_javatests',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
...@@ -439,6 +440,7 @@ ...@@ -439,6 +440,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN: //sync:sync_java_test_support
'target_name': 'sync_java_test_support', 'target_name': 'sync_java_test_support',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
...@@ -450,6 +452,7 @@ ...@@ -450,6 +452,7 @@
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
}, },
{ {
# GN: //sync:sync_fake_server_jni_headers
'target_name': 'sync_fake_server_jni_headers', 'target_name': 'sync_fake_server_jni_headers',
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
...@@ -462,6 +465,7 @@ ...@@ -462,6 +465,7 @@
'includes': [ '../build/jni_generator.gypi' ], 'includes': [ '../build/jni_generator.gypi' ],
}, },
{ {
# GN: //sync:test_support_sync_fake_server_android
'target_name': 'test_support_sync_fake_server_android', 'target_name': 'test_support_sync_fake_server_android',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -474,11 +478,8 @@ ...@@ -474,11 +478,8 @@
'test/fake_server/android/fake_server_helper_android.h', 'test/fake_server/android/fake_server_helper_android.h',
], ],
}, },
],
}],
['OS == "android"', {
'targets': [
{ {
# GN: //sync:sync_unit_tests_apk
'target_name': 'sync_unit_tests_apk', 'target_name': 'sync_unit_tests_apk',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
assert(!is_android && !is_ios)
config("libusb_config") { config("libusb_config") {
include_dirs = [ include_dirs = [
"src/libusb", "src/libusb",
......
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