From 3351465f2bdea7b724ea4338eea3f90d2559772e Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Fri, 8 Sep 2023 18:56:45 -0500 Subject: [PATCH] android fixes --- arm/android/android_ARM32_args.gn | 1 - arm/android/android_ARM64_args.gn | 1 - arm/android/android_x64_args.gn | 1 - arm/android/android_x86_args.gn | 1 - build.sh | 2 +- build_android.sh | 6 +++--- build_mac.sh | 4 ++-- build_win.sh | 2 +- src/content/shell/android/BUILD.gn | 18 +++++++++++------- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arm/android/android_ARM32_args.gn b/arm/android/android_ARM32_args.gn index db917484..8cf35acd 100644 --- a/arm/android/android_ARM32_args.gn +++ b/arm/android/android_ARM32_args.gn @@ -24,7 +24,6 @@ debuggable_apks = false use_relative_vtables_abi = false icu_use_data_file = true # use_cfi_cast = true -use_gnome_keyring = false v8_use_external_startup_data = true android_channel = "stable" disable_android_lint = true diff --git a/arm/android/android_ARM64_args.gn b/arm/android/android_ARM64_args.gn index a389fee7..bd87ff71 100644 --- a/arm/android/android_ARM64_args.gn +++ b/arm/android/android_ARM64_args.gn @@ -24,7 +24,6 @@ is_cfi = true use_relative_vtables_abi = false icu_use_data_file = true use_cfi_cast = true -use_gnome_keyring = false v8_use_external_startup_data = true android_channel = "stable" disable_android_lint = true diff --git a/arm/android/android_x64_args.gn b/arm/android/android_x64_args.gn index edd8e0ab..e077d276 100644 --- a/arm/android/android_x64_args.gn +++ b/arm/android/android_x64_args.gn @@ -16,7 +16,6 @@ is_cfi = true use_relative_vtables_abi = false icu_use_data_file = true use_cfi_cast = true -#use_gnome_keyring = false v8_use_external_startup_data = true android_channel = "stable" disable_android_lint = true diff --git a/arm/android/android_x86_args.gn b/arm/android/android_x86_args.gn index abd93ad1..c4f7b018 100644 --- a/arm/android/android_x86_args.gn +++ b/arm/android/android_x86_args.gn @@ -16,7 +16,6 @@ is_cfi = true use_relative_vtables_abi = false icu_use_data_file = true use_cfi_cast = true -#use_gnome_keyring = false v8_use_external_startup_data = true android_channel = "stable" disable_android_lint = true diff --git a/build.sh b/build.sh index 89e7fa6a..8ea23dd3 100755 --- a/build.sh +++ b/build.sh @@ -19,7 +19,7 @@ try() { "$@" || die "${RED}Failed $*"; } displayHelp () { printf "\n" && printf "${bold}${GRE}Script to build Thorium on Linux.${c0}\n" && - printf "${underline}${YEL}Usage: ${c0}build.sh # (where # is number of jobs)${c0}\n" && + printf "${underline}${YEL}Usage:${c0} build.sh # (where # is number of jobs)${c0}\n" && printf "\n" } case $1 in diff --git a/build_android.sh b/build_android.sh index c72da607..4aa83de5 100755 --- a/build_android.sh +++ b/build_android.sh @@ -19,9 +19,9 @@ try() { "$@" || die "${RED}Failed $*"; } displayHelp () { printf "\n" && printf "${bold}${GRE}Script to build Thorium for Android.${c0}\n" && - printf "${underline}${YEL}Usage: ${c0}build.sh # (where # is number of jobs)${c0}\n" && - printf "${underline}${YEL}Use the --arm32 flag to make an ARM32 Build.{c0}\n" && - printf "${underline}${YEL}Use the --help flag to show this help.{c0}\n" && + printf "${underline}${YEL}Usage:${c0} build.sh # (where # is number of jobs)${c0}\n" && + printf "${YEL}Use the --arm32 flag to make an ARM32 Build.${c0}\n" && + printf "${YEL}Use the --help flag to show this help.${c0}\n" && printf "\n" } case $1 in diff --git a/build_mac.sh b/build_mac.sh index 8a592af0..e5c333d7 100755 --- a/build_mac.sh +++ b/build_mac.sh @@ -19,8 +19,8 @@ try() { "$@" || die "${RED}Failed $*"; } displayHelp () { printf "\n" && printf "${bold}${GRE}Script to build Thorium and Thorium Shell on MacOS.${c0}\n" && - printf "${underline}${YEL}Usage: ${c0}build.sh # (where # is number of jobs)${c0}\n" && - printf "${c0}Use the --build-shell flag to also build the thorium_shell target.${c0}\n" && + printf "${underline}${YEL}Usage:${c0} build.sh # (where # is number of jobs)${c0}\n" && + printf "${YEL}Use the --build-shell flag to also build the thorium_shell target.${c0}\n" && printf "\n" } case $1 in diff --git a/build_win.sh b/build_win.sh index 76e174a2..dcb02f07 100755 --- a/build_win.sh +++ b/build_win.sh @@ -19,7 +19,7 @@ try() { "$@" || die "${RED}Failed $*"; } displayHelp () { printf "\n" && printf "${bold}${GRE}Script to build Thorium for Windows on Linux.${c0}\n" && - printf "${underline}${YEL}Usage: ${c0}build_win.sh # (where # is number of jobs)${c0}\n" && + printf "${underline}${YEL}Usage:${c0} build_win.sh # (where # is number of jobs)${c0}\n" && printf "\n" } case $1 in diff --git a/src/content/shell/android/BUILD.gn b/src/content/shell/android/BUILD.gn index de968a0d..b308ba26 100644 --- a/src/content/shell/android/BUILD.gn +++ b/src/content/shell/android/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/config/android/config.gni") +import("//build/config/android/jni.gni") import("//build/config/android/rules.gni") import("//third_party/icu/config.gni") @@ -18,7 +19,7 @@ generate_jni("content_shell_jni_headers") { ] } -shared_library("libcontent_shell_content_view") { +shared_library_with_jni("libcontent_shell_content_view") { testonly = true deps = [ ":content_shell_jni_headers", @@ -41,9 +42,10 @@ shared_library("libcontent_shell_content_view") { sources = [ "shell_library_loader.cc" ] configs -= [ "//build/config/android:hide_all_but_jni_onload" ] configs += [ "//build/config/android:hide_all_but_jni" ] + java_targets = [ ":content_shell_apk" ] } -shared_library("libcontent_native_test") { +shared_library_with_jni("libcontent_native_test") { testonly = true deps = [ "//base", @@ -56,6 +58,7 @@ shared_library("libcontent_native_test") { sources = [ "shell_test_library_loader.cc" ] configs -= [ "//build/config/android:hide_all_but_jni_onload" ] configs += [ "//build/config/android:hide_all_but_jni" ] + java_targets = [ ":content_shell_test_apk__test_apk" ] } android_resources("content_shell_java_resources") { @@ -95,13 +98,12 @@ android_library("content_shell_java") { "//ui/base/cursor/mojom:cursor_type_java", "//url:gurl_java", ] + srcjar_deps = [ ":content_shell_jni_headers" ] sources = [ "java/src/org/chromium/content_shell/Shell.java", "java/src/org/chromium/content_shell/ShellManager.java", "java/src/org/chromium/content_shell/ShellViewAndroidDelegate.java", ] - - annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] } jinja_template("content_shell_manifest") { @@ -208,24 +210,26 @@ template("content_shell_apk_tmpl") { content_shell_apk_tmpl("content_shell_apk") { target_type = "android_apk" - apk_name = "ThoriumShell" + apk_name = "Thorium_Shell" android_manifest = content_shell_manifest android_manifest_dep = ":content_shell_manifest" shared_libraries = [ ":libcontent_shell_content_view" ] + srcjar_deps = [ ":libcontent_shell_content_view__jni_registration" ] command_line_flags_file = "content-shell-command-line" } content_shell_apk_tmpl("content_shell_test_apk") { target_type = "instrumentation_test_apk" - apk_name = "ThoriumShellTest" + apk_name = "Thorium_Shell_Test" android_manifest = content_shell_test_manifest android_manifest_dep = ":content_shell_test_manifest" shared_libraries = [ ":libcontent_native_test" ] + srcjar_deps = [ ":libcontent_native_test__jni_registration" ] deps = [ "//base:base_java_test_support", "//base:base_javatests", "//content/public/android:content_javatests", - "//net/android:net_javatests", + "//net/android:net_tests_java", ] data_deps = [ "//testing/buildbot/filters:content_shell_test_apk_filters" ] if (enable_chrome_android_internal) {