diff options
author | cjhopman <cjhopman@chromium.org> | 2014-11-17 19:39:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-18 03:40:00 +0000 |
commit | 3d85c6dd6a6540699d3baf583780577327a0cd13 (patch) | |
tree | e8cad397fdf00209ec10b3d87b041350e70621d5 /testing | |
parent | 81d0f757450f8b652bd2f8844ec0970ab9dbb5b4 (diff) | |
download | chromium_src-3d85c6dd6a6540699d3baf583780577327a0cd13.zip chromium_src-3d85c6dd6a6540699d3baf583780577327a0cd13.tar.gz chromium_src-3d85c6dd6a6540699d3baf583780577327a0cd13.tar.bz2 |
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
Review URL: https://codereview.chromium.org/687633003
Cr-Commit-Position: refs/heads/master@{#304555}
Diffstat (limited to 'testing')
-rw-r--r-- | testing/android/junit/BUILD.gn | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/testing/android/junit/BUILD.gn b/testing/android/junit/BUILD.gn index bd8b517..5c668d5 100644 --- a/testing/android/junit/BUILD.gn +++ b/testing/android/junit/BUILD.gn @@ -6,22 +6,20 @@ assert(is_android) import("//build/config/android/rules.gni") -# TODO(GYP): should be java_library # GYP: //testing/android/junit_test.gyp:junit_test_support -android_library("junit_test_support") { +java_library("junit_test_support") { DEPRECATED_java_in_dir = "java/src" deps = [ "//third_party/junit" ] } -# TODO(GYP): should be java_library # GYP: //testing/android/junit_test.gyp:junit_unit_tests -android_library("junit_unittests") { +java_binary("junit_unittests") { deps = [ ":junit_test_support", "//third_party/junit", ] -#main_class = "org.chromium.testing.local.JuniTestMain" + main_class = "org.chromium.testing.local.JunitTestMain" DEPRECATED_java_in_dir = "javatests/src" } |