Skip to content

Commit

Permalink
Revert "jni_zero: Fixing up more broken multiplexing instances"
Browse files Browse the repository at this point in the history
This reverts commit 43c68b0.

Reason for revert: Breaks internal build
See https://ci.chromium.org/ui/p/chrome/builders/ci/chromium-internal-arm-builder-rel/9905/overview

java.io.IOException: error reading obj/ui/base/select_file_dialog_jni_headers_java.processed.jar
	at com.google.turbine.binder.ClassPathBinder.bindClasspath(ClassPathBinder.java:69)
	at com.google.turbine.main.Main.bind(Main.java:272)
	at com.google.turbine.main.Main.compile(Main.java:158)
	at com.google.turbine.main.Main.compile(Main.java:133)
	at com.google.turbine.main.Main.main(Main.java:89)
Caused by: java.nio.file.NoSuchFileException: obj/ui/base/select_file_dialog_jni_headers_java.processed.jar

Original change's description:
> jni_zero: Fixing up more broken multiplexing instances
>
> These are a non-exhaustive set of cases where multiplexing broke
> because we are depending on a generate_jni target without depending on
> the corresponding .cc file which includes the _jni.h file.
>
>
> Bug: 40612925
> Change-Id: I9ce6261998ab0614ee33ba0895b9dee510ce02f7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5478018
> Owners-Override: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Sam Maier <smaier@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1291845}

Bug: 40612925
Change-Id: If966d17bbd232f683d1c2e2beae9035890aa1f5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483669
Auto-Submit: Patrick Noland <pnoland@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291935}
  • Loading branch information
Patrick Noland authored and Chromium LUCI CQ committed Apr 24, 2024
1 parent 09a4d53 commit 3bff690
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 41 deletions.
1 change: 1 addition & 0 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8493,6 +8493,7 @@ static_library("test_support") {
"fast_checkout/mock_fast_checkout_capabilities_fetcher.cc",
"fast_checkout/mock_fast_checkout_capabilities_fetcher.h",
]
deps += [ "//chrome/android:test_support_jni_headers" ]
} else {
sources += [
"apps/intent_helper/preferred_apps_test_util.cc",
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/autofill/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ static_library("test_support") {
"mock_manual_filling_view.h",
]
deps += [
"//chrome/android:test_support_jni_headers",
"//chrome/browser",
"//chrome/browser/autofill",
"//chrome/browser/keyboard_accessory/test_utils/android",
Expand Down
4 changes: 4 additions & 0 deletions components/search_engines/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ source_set("search_engine_utils") {
]

deps = [ "//url" ]

if (is_android) {
deps += [ "//components/search_engines/android:jni_headers" ]
}
}

source_set("search_engine_type") {
Expand Down
5 changes: 4 additions & 1 deletion gpu/vulkan/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ if (enable_vulkan) {

if (is_android) {
sources += [ "tests/native_window_android.cc" ]
deps += [ "//ui/gl" ]
deps += [
"//ui/android:ui_java",
"//ui/gl",
]
}
}

Expand Down
4 changes: 2 additions & 2 deletions net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3173,11 +3173,11 @@ test("net_unittests") {
deps += [
":net_jni_headers",
"//base:base_unittest_support_java",
"//net/android:dummy_spnego_authenticator_java",
"//net/android:dummy_spnego_authenticator_jni",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//net/android:net_test_support_jni",
"//net/android:net_test_support_provider_java",
"//net/android:net_test_support_provider_jni",
"//net/android:net_tests_java",
"//net/android:net_tests_jni",
"//net/android:net_unittests_apk_resources",
Expand Down
30 changes: 6 additions & 24 deletions net/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,43 +101,25 @@ android_library("net_java_test_support") {
}

generate_jni("net_test_support_provider_jni") {
testonly = true
sources = [ "../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java" ]
}

generate_jni("dummy_spnego_authenticator_jni") {
testonly = true
sources = [ "../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java" ]
}

android_library("net_test_support_provider_java") {
testonly = true
sources = [
"../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerService.java",
]
srcjar_deps = [ ":net_test_support_provider_jni" ]

deps = [
":embedded_test_server_aidl_java",
":net_java",
"//base:base_java",
"//base:base_java_url_utils_for_test",
"//third_party/jni_zero:jni_zero_java",
]

data_deps = [ "//net:test_support" ]
}

android_library("dummy_spnego_authenticator_java") {
android_library("net_test_support_provider_java") {
testonly = true
sources = [
"../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
"../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticatorService.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerService.java",
]
srcjar_deps = [ ":dummy_spnego_authenticator_jni" ]
srcjar_deps = [ ":net_test_support_provider_jni" ]

deps = [
":embedded_test_server_aidl_java",
":net_java",
"//base:base_java",
"//base:base_java_url_utils_for_test",
Expand Down
2 changes: 1 addition & 1 deletion net/android/dummy_spnego_authenticator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/base64.h"
#include "net/android/dummy_spnego_authenticator_jni/DummySpnegoAuthenticator_jni.h"
#include "net/android/net_test_support_provider_jni/DummySpnegoAuthenticator_jni.h"
#include "testing/gtest/include/gtest/gtest.h"

using base::android::JavaParamRef;
Expand Down
2 changes: 2 additions & 0 deletions services/device/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ source_set("tests") {
]
deps += [
":device_service_jni_headers",
"//services/device/public/java:geolocation_java_test_support",
"//services/device/usb:java",
"//services/device/vibration/android:vibration_jni_headers",
]
} else {
Expand Down
4 changes: 2 additions & 2 deletions ui/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ static_library("test_support") {
generate_jni("ui_android_jni_headers") {
sources = [
"java/src/org/chromium/ui/OverscrollRefreshHandler.java",
"java/src/org/chromium/ui/base/Clipboard.java",
"java/src/org/chromium/ui/base/EventForwarder.java",
"java/src/org/chromium/ui/base/LocalizationUtils.java",
"java/src/org/chromium/ui/base/SelectFileDialog.java",
"java/src/org/chromium/ui/base/UiAndroidFeatureMap.java",
"java/src/org/chromium/ui/base/ViewAndroidDelegate.java",
"java/src/org/chromium/ui/base/WindowAndroid.java",
Expand Down Expand Up @@ -450,8 +452,6 @@ android_library("ui_no_recycler_view_java") {
"//third_party/androidx:androidx_vectordrawable_vectordrawable_animated_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/accessibility:ax_base_java",
"//ui/base:clipboard_jni_headers_java",
"//ui/base:select_file_dialog_jni_headers_java",
"//ui/base/cursor/mojom:cursor_type_java",
"//ui/base/ime/mojom:mojom_java",
"//url:gurl_java",
Expand Down
9 changes: 2 additions & 7 deletions ui/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -925,20 +925,15 @@ static_library("test_support") {
if (is_android) {
generate_jni("ui_base_jni_headers") {
sources = [
"../android/java/src/org/chromium/ui/base/Clipboard.java",
"../android/java/src/org/chromium/ui/base/DeviceFormFactor.java",
"../android/java/src/org/chromium/ui/base/IdleDetector.java",
"../android/java/src/org/chromium/ui/base/LocalizationUtils.java",
"../android/java/src/org/chromium/ui/base/ResourceBundle.java",
"../android/java/src/org/chromium/ui/base/SelectFileDialog.java",
"../android/java/src/org/chromium/ui/base/TouchDevice.java",
]
}
generate_jni("select_file_dialog_jni_headers") {
sources =
[ "../android/java/src/org/chromium/ui/base/SelectFileDialog.java" ]
}
generate_jni("clipboard_jni_headers") {
sources = [ "../android/java/src/org/chromium/ui/base/Clipboard.java" ]
}
}

bundle_data("ui_base_unittests_bundle_data") {
Expand Down
2 changes: 1 addition & 1 deletion ui/base/clipboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ component("clipboard") {
}

if (is_android) {
deps += [ "//ui/base:clipboard_jni_headers" ]
deps += [ "//ui/base:ui_base_jni_headers" ]
}

if (is_mac) {
Expand Down
2 changes: 1 addition & 1 deletion ui/base/clipboard/clipboard_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include "ui/base/clipboard/clipboard_format_type.h"
#include "ui/base/clipboard/clipboard_metrics.h"
#include "ui/base/clipboard/clipboard_util.h"
#include "ui/base/clipboard_jni_headers/Clipboard_jni.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "ui/base/ui_base_jni_headers/Clipboard_jni.h"
#include "ui/gfx/android/java_bitmap.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image.h"
Expand Down
2 changes: 1 addition & 1 deletion ui/shell_dialogs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ component("shell_dialogs") {
]
deps += [
"//ui/android",
"//ui/base:select_file_dialog_jni_headers",
"//ui/base:ui_base_jni_headers",
]
include_dirs = [ "$root_gen_dir/ui" ]
libs = [ "jnigraphics" ]
Expand Down
2 changes: 1 addition & 1 deletion ui/shell_dialogs/select_file_dialog_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/android/window_android.h"
#include "ui/base/select_file_dialog_jni_headers/SelectFileDialog_jni.h"
#include "ui/base/ui_base_jni_headers/SelectFileDialog_jni.h"
#include "ui/shell_dialogs/select_file_policy.h"
#include "ui/shell_dialogs/selected_file_info.h"
#include "url/gurl.h"
Expand Down

0 comments on commit 3bff690

Please sign in to comment.