Revert "Use "resemblejs" dep"

This reverts commit b899ec56016293af14d14591ac51a3db5d1ece2c.

Reason for revert: It is not necessary to lazily load the resemblejs
library. It can be built into the plugin js, which is much simpler and
easier to maintain. Will follow up with the simple fix.

Change-Id: Idb522895dc80951dbc2d10a23957edd1f5918710
diff --git a/BUILD b/BUILD
index edd94b3..f84f778 100644
--- a/BUILD
+++ b/BUILD
@@ -1,45 +1,8 @@
-load("//tools/bzl:genrule2.bzl", "genrule2")
-load("//tools/bzl:js.bzl", "bundle_assets", "polygerrit_plugin")
-load("//tools/bzl:plugin.bzl", "gerrit_plugin")
-
-gerrit_plugin(
-    name = "image-diff",
-    srcs = ["java/com/googlesource/gerrit/plugins/imagediff/ImageDiffModule.java"],
-    manifest_entries = [
-        "Gerrit-PluginName: image-diff",
-        "Gerrit-Module: com.googlesource.gerrit.plugins.codemirror.ImageDiffModule",
-        "Implementation-Title: Image Diff plugin",
-    ],
-    resource_jars = [":image-diff-static"],
-)
-
-genrule2(
-    name = "image-diff-static",
-    srcs = [":image_diff"],
-    outs = ["image-diff-static.jar"],
-    cmd = " && ".join([
-        "mkdir $$TMP/static",
-        "cp -r $(locations :image_diff) $$TMP/static",
-        "cd $$TMP",
-        "zip -Drq $$ROOT/$@ -g .",
-    ]),
-)
-
-bundle_assets(
-    name = "image-diff-assets",
-    srcs = glob(["gr-resemble-diff-mode/resemblejs-assets.html"]),
-    app = "gr-resemble-diff-mode/resemblejs-assets.html",
-    split = False,
-    deps = [
-        "//lib/js:resemblejs"
-    ],
-)
+load("//tools/bzl:js.bzl", "polygerrit_plugin")
 
 polygerrit_plugin(
-    name = "image_diff",
+    name = "image-diff",
     srcs = glob(["**/*.html", "**/*.js"]),
     app = "plugin.html",
-    assets = [
-        ":image-diff-assets"
-    ],
-)
+    deps = ["//lib/js:resemblejs"],
+)
\ No newline at end of file
diff --git a/gr-resemble-diff-mode/gr-resemble-diff-mode.html b/gr-resemble-diff-mode/gr-resemble-diff-mode.html
index b074f78..edc6a93 100644
--- a/gr-resemble-diff-mode/gr-resemble-diff-mode.html
+++ b/gr-resemble-diff-mode/gr-resemble-diff-mode.html
@@ -14,8 +14,7 @@
 limitations under the License.
 -->
 
-<link rel="import" href="../image-diff-assets.html">
-
+<script src="../node_modules/resemblejs/resemble.js"></script>
 <dom-module id="gr-resemble-diff-mode">
   <template>
     <style>
diff --git a/gr-resemble-diff-mode/resemblejs-assets.html b/gr-resemble-diff-mode/resemblejs-assets.html
deleted file mode 100644
index 8e17b02..0000000
--- a/gr-resemble-diff-mode/resemblejs-assets.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<!--
-@license
-Copyright (C) 2018 The Android Open Source Project
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<script src="../bower_components/resemblejs/resemble.js"></script>
diff --git a/java/com/googlesource/gerrit/plugins/imagediff/ImageDiffModule.java b/java/com/googlesource/gerrit/plugins/imagediff/ImageDiffModule.java
deleted file mode 100644
index ffb1b1a..0000000
--- a/java/com/googlesource/gerrit/plugins/imagediff/ImageDiffModule.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.imagediff;
-
-import com.google.gerrit.extensions.registration.DynamicSet;
-import com.google.gerrit.extensions.restapi.RestApiModule;
-import com.google.gerrit.extensions.webui.JavaScriptPlugin;
-import com.google.gerrit.extensions.webui.WebUiPlugin;
-
-public class ImageDiffModule extends RestApiModule {
-  @Override
-  protected void configure() {
-    DynamicSet.bind(binder(), WebUiPlugin.class)
-        .toInstance(new JavaScriptPlugin("image_diff.html"));
-  }
-}