diff --git a/.buckconfig b/.buckconfig index 1bf9b3689d..e4a19f1ade 100644 --- a/.buckconfig +++ b/.buckconfig @@ -11,6 +11,7 @@ gerrit = //:gerrit release = //:release safari = //:safari + soyc = //gerrit-gwtui:ui_soyc withdocs = //:withdocs [buildfile] diff --git a/.gitignore b/.gitignore index b356144211..c30cee65d1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ /.buckd /buck-cache /buck-out +/extras /local.properties *.pyc /gwt-unitCache diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt index fb04bf418a..6bd3905dfb 100644 --- a/Documentation/dev-buck.txt +++ b/Documentation/dev-buck.txt @@ -231,6 +231,26 @@ The WAR file will be placed in: buck-out/gen/withdocs.war ---- +[[soyc]] +=== GWT Compile Report + +The GWT compiler can output a compile report (or "story of your compile"), +describing the size of the JavaScript and which source classes contributed +to the overall download size. + +---- + buck build soyc +---- + +The report will be written as an HTML page to the extras directory, and +can be opened and viewed in any web browser: + +---- + extras/gerrit_ui/soycReport/compile-report/index.html +---- + +Only the "Split Point Report" is created, "Compiler Metrics" are not output. + [[release]] === Gerrit Release WAR File diff --git a/gerrit-gwtui/BUCK b/gerrit-gwtui/BUCK index d50c6e73eb..aad5e0b5fd 100644 --- a/gerrit-gwtui/BUCK +++ b/gerrit-gwtui/BUCK @@ -36,6 +36,17 @@ gwt_binary( vm_args = GWT_JVM_ARGS, ) +gwt_binary( + name = 'ui_soyc', + modules = [MODULE], + module_deps = [':ui_module'], + deps = DEPS + [':ui_dbg'], + local_workers = cpu_count(), + strict = True, + experimental_args = GWT_COMPILER_ARGS + ['-compileReport'], + vm_args = GWT_JVM_ARGS, +) + gwt_binary( name = 'ui_dbg', modules = [MODULE],