Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 1 | # Copyright 2012 Google Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | |
| 15 | # Description: |
| 16 | # Open Source Code for Super Dev Mode. |
| 17 | # http://go/superdevmode |
| 18 | # (Within Google, depend on //java/com/google/gwt/dev/codeserver.) |
| 19 | |
| 20 | # released under various licenses, but Google owns the copyright |
| 21 | licenses(["unencumbered"]) |
| 22 | |
Roberto Lublinerman | 37ff62f | 2016-09-27 13:39:25 -0700 | [diff] [blame] | 23 | load("//third_party/java_src/gwt:build-macros.bzl", "AugmentedJar") |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 24 | |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 25 | # The codeserver jar, built the open source way. |
| 26 | # For GWT internal use only. |
| 27 | # It must be jarjar-ed and dependencies stripped before exposing to google3. |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 28 | java_library( |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 29 | name = "codeserver-bare", |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 30 | srcs = glob(["java/**/*.java"]), |
| 31 | resources = glob([ |
| 32 | "java/**/*.html", |
| 33 | "java/**/*.ico", |
| 34 | "java/**/*.js", |
| 35 | ]), |
| 36 | deps = [ |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 37 | # dependencies for open source code (should match ant) |
| 38 | "//third_party/java_src/gwt/svn/trunk/dev:gwt-dev-bare", |
| 39 | "//third_party/java_src/gwt/svn/tools:dev_deps", |
| 40 | "//third_party/java_src/gwt/svn/tools:servlet_api_3", |
| 41 | ], |
| 42 | ) |
| 43 | |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 44 | java_library( |
| 45 | name = "testlib", |
| 46 | testonly = 1, |
Roberto Lublinerman | 204f6cb | 2014-09-18 12:34:42 -0700 | [diff] [blame] | 47 | srcs = glob(["javatests/**/*.java"]), |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 48 | deps = [ |
| 49 | ":codeserver-bare", |
John Stalcup | 5486a48 | 2014-09-30 11:44:09 -0700 | [diff] [blame] | 50 | "//java/com/google/common/collect", |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 51 | "//third_party/java/junit", |
Roberto Lublinerman | df6110c | 2015-03-12 12:08:09 -0700 | [diff] [blame] | 52 | "//third_party/java_src/gwt:gwt-testing", |
John Stalcup | 5486a48 | 2014-09-30 11:44:09 -0700 | [diff] [blame] | 53 | "//third_party/java_src/gwt/svn/tools:dev_deps", |
| 54 | "//third_party/java_src/gwt/svn/trunk/dev:gwt-dev-only", |
| 55 | "//third_party/java_src/gwt/svn/trunk/user:user-test-code", |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 56 | ], |
| 57 | ) |
| 58 | |
John Stalcup | 6cdfe15 | 2014-09-30 14:38:15 -0700 | [diff] [blame] | 59 | test_suite( |
| 60 | name = "tests", |
| 61 | tests = [ |
| 62 | ":RecompilerTest", |
| 63 | ":SourceHandlerTest", |
| 64 | ], |
| 65 | ) |
| 66 | |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 67 | java_test( |
John Stalcup | 6cdfe15 | 2014-09-30 14:38:15 -0700 | [diff] [blame] | 68 | name = "SourceHandlerTest", |
Brian Slesinsky | 13724c6 | 2014-09-03 17:15:50 -0700 | [diff] [blame] | 69 | test_class = "com.google.gwt.dev.codeserver.SourceHandlerTest", |
| 70 | runtime_deps = [ |
| 71 | ":testlib", |
| 72 | ], |
| 73 | ) |
| 74 | |
John Stalcup | 5486a48 | 2014-09-30 11:44:09 -0700 | [diff] [blame] | 75 | java_test( |
John Stalcup | 6cdfe15 | 2014-09-30 14:38:15 -0700 | [diff] [blame] | 76 | name = "RecompilerTest", |
John Stalcup | 5486a48 | 2014-09-30 11:44:09 -0700 | [diff] [blame] | 77 | test_class = "com.google.gwt.dev.codeserver.RecompilerTest", |
| 78 | runtime_deps = [ |
| 79 | ":testlib", |
| 80 | ], |
| 81 | ) |
| 82 | |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 83 | # Repackaged codeserver for google3. |
| 84 | AugmentedJar( |
| 85 | name = "codeserver", |
| 86 | srcs = [], |
| 87 | added_jars = [ |
| 88 | ":libcodeserver-bare.jar", |
| 89 | ], |
| 90 | constraints = [], |
| 91 | dojarjar = 1, |
| 92 | export_deps = [ |
| 93 | # Dependencies for google3 (after jarjar). |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 94 | "//third_party/java_src/gwt:gwt-dev", |
Matthew Dempsky | 4b00780 | 2013-11-12 19:41:59 -0800 | [diff] [blame] | 95 | "//third_party/java_src/gwt:gwt-dev-private", |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 96 | # The codeserver needs servlet_api_3. Be careful about adding dependencies. |
Goktug Gokdogan | 6e31a15 | 2014-01-28 12:40:25 -0800 | [diff] [blame] | 97 | "//third_party/java_src/gwt/svn/tools:servlet_api_3", |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 98 | ], |
Brian Slesinsky | 926c108 | 2014-06-10 13:51:56 -0700 | [diff] [blame] | 99 | visibility = ["//java/com/google/gwt/dev/codeserver:__pkg__"], |
Matthew Dempsky | 7da3948 | 2013-05-10 13:54:49 -0700 | [diff] [blame] | 100 | ) |
| 101 | |
| 102 | # allow the top-level ant build to call us |
| 103 | filegroup( |
| 104 | name = "ant", |
| 105 | srcs = glob([ |
| 106 | "java/**/*.java", |
| 107 | "java/**/*.html", |
| 108 | "java/**/*.ico", |
| 109 | "java/**/*.js", |
| 110 | ]) + ["build.xml"], |
| 111 | visibility = ["//third_party/java_src/gwt:__pkg__"], |
| 112 | ) |