-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android bundle #8421
Android bundle #8421
Conversation
build/android/BUILD.gn
Outdated
outputs = [ "$target_sign_app_path-singed" ] | ||
args = [ | ||
outputs = [ "$target_sign_app_path-signed" ] | ||
args = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need that
build/commands/lib/build.js
Outdated
@@ -41,7 +41,8 @@ const touchOverriddenFiles = () => { | |||
|
|||
const chromiumSrcDir = path.join(config.srcDir, 'brave', 'chromium_src') | |||
var sourceFiles = util.walkSync(chromiumSrcDir, applyFileFilter) | |||
const additionalGen = getAdditionalGenLocation() | |||
// const additionalGen = getAdditionalGenLocation() | |||
const additionalGen = undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug when building release+x64, where the output folder will be android_Release
in first run but npm will use android_Release_x64
while resuming which makes the build starts over.
@@ -0,0 +1,72 @@ | |||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's 2021
@@ -0,0 +1,70 @@ | |||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a year
@@ -8,7 +8,7 @@ index b067a3f7af514bc48632365427ba8ecffa4885df..dadadab8dd95e47bc228053bd1335cbd | |||
] | |||
+ deps += brave_chrome_app_java_resources_deps sources += brave_java_resources resource_overlay = true | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, don't remove the space on "empty lines" in patches. Some Windows versions of git will fail to apply the patch if the space is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patches
change LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wchen342 awesome work!
The PR looks good in general.
I have a minor notices I left here about the commented out lines.
Also it seems the PR drops out ability to build apk. This may make local development and posting apks to Github a bit harder. Is it possible to have ability to choose what to build, either aab or old akps by command line switch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
argument_parser.add_argument('prvt_key_passwd') | ||
argument_parser.add_argument('key_name') | ||
args = argument_parser.parse_args() | ||
argument_parser = argparse.ArgumentParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not use apkbuilder.py from upstream? Or at least use FinalizeApk
from finalize_apk.py? I feel more comfortable with this stuff when we're doing the same thing as upsteam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files you mentioned are only appicable to apk
files. The only place upstream tried to sign a bundle is when creating a wrapper for running bundles, and they only sign the extracted apks in that case not the bundle itself (see //build/config/android/rules.gni#L4915
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, they looked very similar, but maybe there were some differences I didn't notice
build/commands/lib/config.js
Outdated
@@ -86,6 +86,7 @@ const Config = function () { | |||
this.targetOS = getNPMConfig(['target_os']) | |||
this.gypTargetArch = 'x64' | |||
this.targetApkBase ='classic' | |||
this.targetOutput = 'apk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the default for release be aab
? specifying Release
should set everything correctly and the only "overrides" we should have in CI are for things we can't set here like api keys and urls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also we have two defaults here because of https://github.com/brave/brave-core/pull/8421/files#diff-c762921b1126e4475bffab885d122da3939e98234baa81d784b613ee352bc9cdR61 so this one should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ex Config.prototype.isOfficialBuild = function () { return this.buildConfig === 'Release' }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplicate is removed.
build/commands/scripts/commands.js
Outdated
@@ -72,6 +73,7 @@ program | |||
.option('--target_os <target_os>', 'target OS') | |||
.option('--target_arch <target_arch>', 'target architecture') | |||
.option('--target_apk_base <target_apk_base>', 'target Android OS apk (classic, modern, mono)', 'classic') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this param name change or at least update the description so we know it applies to apk and aab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name and descriptions are updated.
build/commands/scripts/commands.js
Outdated
@@ -58,6 +58,7 @@ program | |||
.option('--target_os <target_os>', 'target OS') | |||
.option('--target_arch <target_arch>', 'target architecture') | |||
.option('--target_apk_base <target_apk_base>', 'target Android OS apk (classic, modern, mono)', 'classic') | |||
.option('--target_output <target_output>', 'target Android output format (apk, aab)', 'apk') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target_apk_base and target_output aren't relevant to gn_check. Only target_os and target_arch are relevant here because those affect the output dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably leave the default out of this one since we want to do it by build config type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure which one is better, it will probably depend on how CI will be changed. @SergeyZhukovsky did you discuss with Mihai?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change the default to aab for now but that means local debugging needs an extra option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @bridiver meant default to aab only for Release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change on gn_check is reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @bridiver meant default to aab only for Release?
I checked the js files, the only place isOfficialBuild
is checked is when setting channels. I am not sure whether it is a good place to change default though.
03e988f
to
ffafa4b
Compare
@@ -134,7 +135,8 @@ program | |||
.option('--notarize', 'notarize the macOS app with Apple') | |||
.option('--target_os <target_os>', 'target OS') | |||
.option('--target_arch <target_arch>', 'target architecture') | |||
.option('--target_apk_base <target_apk_base>', 'target Android OS apk (classic, modern, mono)', 'classic') | |||
.option('--target_android_base <target_android_base>', 'target Android SDk level for apk or aab (classic, modern, mono)', 'classic') | |||
.option('--target_android_output_format <target_android_output_format>', 'target Android output format (apk, aab)', 'aab') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this to be APK by default? for developers at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mihaiplesa we do it here e03657f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for create_dist we want to keep aab by default as it's a release distribution
build/commands/scripts/commands.js
Outdated
@@ -134,7 +135,8 @@ program | |||
.option('--notarize', 'notarize the macOS app with Apple') | |||
.option('--target_os <target_os>', 'target OS') | |||
.option('--target_arch <target_arch>', 'target architecture') | |||
.option('--target_apk_base <target_apk_base>', 'target Android OS apk (classic, modern, mono)', 'classic') | |||
.option('--target_android_base <target_android_base>', 'target Android SDk level for apk or aab (classic, modern, mono)', 'classic') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo SDK
On iOS 17 rotating the device with a full screen modal presented (e.g. Playlist, Tab Tray) to landscape then back to portrait does not trigger `traitCollectionDidChange`/`willTransition`/etc calls and so the toolbar remains in the wrong state.
Resolves brave/brave-browser/issues/15087. Resolves brave/brave-browser/issues/15063.
Needs https://github.com/brave/devops/issues/4815
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: