summaryrefslogtreecommitdiffstats
path: root/ui/android
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 00:11:03 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 00:11:03 +0000
commit26046b5fe46738a9c214a64862831e9417f27850 (patch)
tree54071de6ea72c3d5652eff37ff38f2c0483de5df /ui/android
parentcbba05a61cec41f996321156e14d2a0ec306451e (diff)
downloadchromium_src-26046b5fe46738a9c214a64862831e9417f27850.zip
chromium_src-26046b5fe46738a9c214a64862831e9417f27850.tar.gz
chromium_src-26046b5fe46738a9c214a64862831e9417f27850.tar.bz2
[Android][gn] Add android resources templates
This adds support for android resources to gn. Two new templates are introduced: java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs grit and generates Android strings.xml files and then zips them together. android_resources: This is the target for android resources. It is mostly a wrapper around process_resources.py. This is *not part* of android_library (like it is in gyp). Making these two things separate is more like facebook's BUCK and google's internal build rules (and gyp's java.gypi and java_apk.gypi have gotten way too big and complicated). Changes to the actual build scripts are very minor except for the added support for andoid_resources to write_build_config.py. Building resources requires getting all the transitive resource dependencies, and so this reuses the simple sorted transitive dependency thing from write_ordered_libraries.py. TBR=rch@chromium.org BUG=359249 Review URL: https://codereview.chromium.org/361633002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/android')
-rw-r--r--ui/android/BUILD.gn80
1 files changed, 80 insertions, 0 deletions
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn
new file mode 100644
index 0000000..d781721
--- /dev/null
+++ b/ui/android/BUILD.gn
@@ -0,0 +1,80 @@
+import("//build/config/android/rules.gni")
+
+assert(is_android)
+
+java_cpp_template("window_open_disposition_srcjar") {
+ package_name = "org/chromium/ui"
+ sources = [
+ "java/WindowOpenDisposition.template",
+ ]
+ inputs = [
+ "../base/window_open_disposition_list.h"
+ ]
+}
+
+java_cpp_template("bitmap_format_srcjar") {
+ package_name = "org/chromium/ui/gfx"
+ sources = [
+ "java/BitmapFormat.template",
+ ]
+ inputs = [
+ "../gfx/android/bitmap_config_list.h"
+ ]
+}
+
+java_strings_grd("ui_strings_grd") {
+ grd_file = "java/strings/android_ui_strings.grd"
+}
+
+android_resources("ui_java_res") {
+ custom_package = "org.chromium.ui"
+ resource_dirs = [
+ "java/res"
+ ]
+ deps = [
+ ":ui_strings_grd",
+ ]
+}
+
+android_library("ui_java") {
+ java_files = [
+ "java/src/org/chromium/ui/ColorPickerAdvanced.java",
+ "java/src/org/chromium/ui/ColorPickerAdvancedComponent.java",
+ "java/src/org/chromium/ui/ColorPickerDialog.java",
+ "java/src/org/chromium/ui/ColorPickerMoreButton.java",
+ "java/src/org/chromium/ui/ColorPickerSimple.java",
+ "java/src/org/chromium/ui/ColorSuggestion.java",
+ "java/src/org/chromium/ui/ColorSuggestionListAdapter.java",
+ "java/src/org/chromium/ui/DropdownAdapter.java",
+ "java/src/org/chromium/ui/DropdownDividerDrawable.java",
+ "java/src/org/chromium/ui/DropdownItem.java",
+ "java/src/org/chromium/ui/DropdownPopupWindow.java",
+ "java/src/org/chromium/ui/OnColorChangedListener.java",
+ "java/src/org/chromium/ui/UiUtils.java",
+ "java/src/org/chromium/ui/VSyncMonitor.java",
+ "java/src/org/chromium/ui/autofill/AutofillPopup.java",
+ "java/src/org/chromium/ui/autofill/AutofillSuggestion.java",
+ "java/src/org/chromium/ui/base/ActivityWindowAndroid.java",
+ "java/src/org/chromium/ui/base/Clipboard.java",
+ "java/src/org/chromium/ui/base/DeviceFormFactor.java",
+ "java/src/org/chromium/ui/base/LocalizationUtils.java",
+ "java/src/org/chromium/ui/base/SelectFileDialog.java",
+ "java/src/org/chromium/ui/base/TouchDevice.java",
+ "java/src/org/chromium/ui/base/ViewAndroid.java",
+ "java/src/org/chromium/ui/base/ViewAndroidDelegate.java",
+ "java/src/org/chromium/ui/base/WindowAndroid.java",
+ "java/src/org/chromium/ui/gfx/BitmapHelper.java",
+ "java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java",
+ "java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java",
+ "java/src/org/chromium/ui/gl/SurfaceTextureListener.java",
+ "java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java",
+ ]
+ deps = [
+ ":ui_java_res",
+ "//base:base_java",
+ ]
+ srcjar_deps = [
+ ":window_open_disposition_srcjar",
+ ":bitmap_format_srcjar",
+ ]
+}