Rearrange files to make the plugin more easily testable

Change-Id: Ic71f872667cf87128f0712b75b8db3d19ec85715
diff --git a/BUILD b/BUILD
index 1488f7d..3c03593 100644
--- a/BUILD
+++ b/BUILD
@@ -2,11 +2,11 @@
 
 gerrit_plugin(
     name = "binary-size",
-    srcs = glob(["src/main/java/**/*.java"]),
+    srcs = glob(["java/**/*.java"]),
     manifest_entries = [
         "Gerrit-PluginName: binary-size",
         "Gerrit-Module: com.googlesource.chromium.plugins.binarysize.BinarySizeModule",
         "Implementation-Title: Binary Size plugin",
     ],
-    resources = glob(["src/main/**/*"]),
+    resources = glob(["static/**/*"]),
 )
diff --git a/README.md b/README.md
index 7459b4c..8d217a3 100644
--- a/README.md
+++ b/README.md
@@ -37,15 +37,6 @@
 
 ## Development
 
-### To use with the local testsite
-
-Use the script run-with-testsite.sh; this rebuilds the plugin with
-bazel, copies it over and restarts the local testsite. Example invocation:
-
-```
-GERRIT_DIR=~/gerrit GERRIT_TESTSITE_DIR=~/testsite ./run-with-testsite.sh
-```
-
 ### To use with the polygerrit-ui server against live data
 
 Use the script run-with-prod-data.sh; this creates a temporary directory
diff --git a/src/main/java/com/googlesource/chromium/plugins/binarysize/BinarySizeModule.java b/java/com/googlesource/chromium/plugins/binarysize/BinarySizeModule.java
similarity index 100%
rename from src/main/java/com/googlesource/chromium/plugins/binarysize/BinarySizeModule.java
rename to java/com/googlesource/chromium/plugins/binarysize/BinarySizeModule.java
diff --git a/src/main/java/com/googlesource/chromium/plugins/binarysize/GetConfig.java b/java/com/googlesource/chromium/plugins/binarysize/GetConfig.java
similarity index 100%
rename from src/main/java/com/googlesource/chromium/plugins/binarysize/GetConfig.java
rename to java/com/googlesource/chromium/plugins/binarysize/GetConfig.java
diff --git a/run-with-prod-data.sh b/run-with-prod-data.sh
index 0ceeafc..0428e40 100755
--- a/run-with-prod-data.sh
+++ b/run-with-prod-data.sh
@@ -11,16 +11,9 @@
 
 readonly SCRIPT_DIR=$(realpath "$(dirname "${0}")")
 readonly GERRIT_DIR=$(realpath "${GERRIT_DIR:-${SCRIPT_DIR}/../..}")
-readonly GERRIT_HOST="${GERRIT_HOST:-chromium-review.googlesource.com}"
-readonly PLUGIN_PATH=$(realpath --relative-to="$GERRIT_DIR" \
-    "$SCRIPT_DIR/src/main/resources/static/binary-size.html")
+readonly PLUGINS_PATH=$(realpath --relative-to="$GERRIT_DIR" "$SCRIPT_DIR/..")
+readonly GERRIT_HOST="${GERRIT_HOST:-webrtc-review.googlesource.com}"
 
-echo "Using ${SCRIPT_DIR} as binary-size plugin directory."
-echo "Using ${GERRIT_DIR} as Gerrit directory."
-echo "Using ${GERRIT_HOST} as Gerrit host."
-echo "Using ${PLUGIN_PATH} as path to plugin web UI entry point."
-
-(cd "${GERRIT_DIR}" && \
-    polygerrit-ui/run-server.sh \
-    --host="${GERRIT_HOST}" \
-    --plugins="$PLUGIN_PATH")
+(set -x &&
+    cd "${GERRIT_DIR}" &&
+    polygerrit-ui/run-server.sh --plugins="$PLUGINS_PATH" --host="$GERRIT_HOST")
diff --git a/src/main/resources/static/binary-size-view.html b/static/binary-size-view.html
similarity index 100%
rename from src/main/resources/static/binary-size-view.html
rename to static/binary-size-view.html
diff --git a/src/main/resources/static/binary-size-view.js b/static/binary-size-view.js
similarity index 100%
rename from src/main/resources/static/binary-size-view.js
rename to static/binary-size-view.js
diff --git a/src/main/resources/static/binary-size.html b/static/binary-size.html
similarity index 100%
rename from src/main/resources/static/binary-size.html
rename to static/binary-size.html
diff --git a/src/main/resources/static/cr-buildbucket-client.html b/static/cr-buildbucket-client.html
similarity index 100%
rename from src/main/resources/static/cr-buildbucket-client.html
rename to static/cr-buildbucket-client.html
diff --git a/src/main/resources/static/cr-buildbucket-client.js b/static/cr-buildbucket-client.js
similarity index 100%
rename from src/main/resources/static/cr-buildbucket-client.js
rename to static/cr-buildbucket-client.js
diff --git a/test/binary-size-view_test.html b/test/binary-size-view_test.html
index ec5901e..fb4dc0d 100644
--- a/test/binary-size-view_test.html
+++ b/test/binary-size-view_test.html
@@ -11,7 +11,7 @@
 <script src="./bower_components/web-component-tester/browser.js"></script>
 
 <link rel="import" href="./bower_components/iron-test-helpers/iron-test-helpers.html">
-<link rel="import" href="../src/main/resources/static/binary-size-view.html">
+<link rel="import" href="../static/binary-size-view.html">
 
 <test-fixture id="basic">
   <template>
diff --git a/test/cr-buildbucket-client_test.html b/test/cr-buildbucket-client_test.html
index 0b03f36..77f0558 100644
--- a/test/cr-buildbucket-client_test.html
+++ b/test/cr-buildbucket-client_test.html
@@ -11,7 +11,7 @@
 <script src="./bower_components/web-component-tester/browser.js"></script>
 
 <link rel="import" href="./bower_components/iron-test-helpers/iron-test-helpers.html">
-<link rel="import" href="../src/main/resources/static/cr-buildbucket-client.html">
+<link rel="import" href="../static/cr-buildbucket-client.html">
 
 <test-fixture id="instanceOne">
   <template>