Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Issue 687633003: Greatly improve (non-android) java support (Closed)

Created:
6 years, 1 month ago by cjhopman
Modified:
6 years, 1 month ago
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Greatly improve (non-android) java support This change fixes java_library and java_prebuilt to actually construct a classpath based on their dependents. It adds java_binary that is similar to java_library but also creates a script in $root_build_dir/bin/ to actually run a java jar (it builds in the classpath and main class so that it can just be run like a normal executable). Adds the flags "android" and "has_android_platform" to the java_library template. An android_library can depend on a java_library only if the java_libary has "android == true". A java_library can depend on an android_library only if the java_libary has "has_android_platform == true". This merges several of the paths for compiling java between android and non-android implementations into a single one that just takes a flag controlling it's behavior (enabling/disabling dex, for example). Adds a very simple java_binary target. This can be run to ensure it works, output is printed, and exit code is propagated. TBR=brettw BUG=359249, 383646, 417843 Committed: https://crrev.com/3d85c6dd6a6540699d3baf583780577327a0cd13 Cr-Commit-Position: refs/heads/master@{#304555}

Patch Set 1 #

Patch Set 2 : Add missing files #

Patch Set 3 : junit_unittests -> java_binary #

Total comments: 34

Patch Set 4 : Big rebase #

Patch Set 5 : Address comments #

Total comments: 2

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+693 lines, -376 lines) Patch
M BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A build/android/gyp/create_java_binary_script.py View 1 2 3 4 5 1 chunk +76 lines, -0 lines 0 comments Download
A build/android/gyp/test/BUILD.gn View 1 1 chunk +11 lines, -0 lines 0 comments Download
A build/android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java View 1 1 chunk +15 lines, -0 lines 0 comments Download
A + build/android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java View 1 2 3 4 1 chunk +5 lines, -8 lines 0 comments Download
M build/android/gyp/write_build_config.py View 1 2 3 4 7 chunks +50 lines, -17 lines 0 comments Download
M build/config/android/internal_rules.gni View 1 2 3 4 11 chunks +335 lines, -170 lines 0 comments Download
M build/config/android/rules.gni View 1 2 3 4 12 chunks +195 lines, -172 lines 0 comments Download
M testing/android/junit/BUILD.gn View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/junit/BUILD.gn View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
cjhopman
newt: * here's a fun one for you
6 years, 1 month ago (2014-10-29 00:03:45 UTC) #2
newt (away)
Woah. What is this going to be used for? Unit tests?!?
6 years, 1 month ago (2014-10-29 00:13:05 UTC) #3
cjhopman
On 2014/10/29 00:13:05, newt wrote: > Woah. What is this going to be used for? ...
6 years, 1 month ago (2014-10-29 00:20:23 UTC) #4
cjhopman
On 2014/10/29 00:20:23, cjhopman wrote: > On 2014/10/29 00:13:05, newt wrote: > > Woah. What ...
6 years, 1 month ago (2014-10-29 00:26:13 UTC) #5
newt (away)
https://codereview.chromium.org/687633003/diff/40001/build/android/gyp/create_java_binary_script.py File build/android/gyp/create_java_binary_script.py (right): https://codereview.chromium.org/687633003/diff/40001/build/android/gyp/create_java_binary_script.py#newcode22 build/android/gyp/create_java_binary_script.py:22: # Copyright 2014 The Chromium Authors. All rights reserved. ...
6 years, 1 month ago (2014-11-03 22:12:45 UTC) #6
cjhopman
https://codereview.chromium.org/687633003/diff/40001/build/android/gyp/create_java_binary_script.py File build/android/gyp/create_java_binary_script.py (right): https://codereview.chromium.org/687633003/diff/40001/build/android/gyp/create_java_binary_script.py#newcode22 build/android/gyp/create_java_binary_script.py:22: # Copyright 2014 The Chromium Authors. All rights reserved. ...
6 years, 1 month ago (2014-11-15 03:37:59 UTC) #7
newt (away)
lgtm https://codereview.chromium.org/687633003/diff/80001/build/android/gyp/create_java_binary_script.py File build/android/gyp/create_java_binary_script.py (right): https://codereview.chromium.org/687633003/diff/80001/build/android/gyp/create_java_binary_script.py#newcode64 build/android/gyp/create_java_binary_script.py:64: classpath=("\"%s\"" % "\", \"".join(classpath)), seems like a good ...
6 years, 1 month ago (2014-11-15 04:48:52 UTC) #8
cjhopman
jbudorick: third_party/junit OWNERS +ptal at anything that interests you
6 years, 1 month ago (2014-11-18 02:29:56 UTC) #10
jbudorick
third_party/junit/ lgtm
6 years, 1 month ago (2014-11-18 02:38:01 UTC) #11
cjhopman
brettw: TBR for //BUILD.gn
6 years, 1 month ago (2014-11-18 02:52:32 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/687633003/100001
6 years, 1 month ago (2014-11-18 02:53:11 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years, 1 month ago (2014-11-18 03:39:45 UTC) #16
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/3d85c6dd6a6540699d3baf583780577327a0cd13 Cr-Commit-Position: refs/heads/master@{#304555}
6 years, 1 month ago (2014-11-18 03:40:32 UTC) #17
brettw
6 years, 1 month ago (2014-11-18 18:07:42 UTC) #18
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698