blob: 531337b1b12fb67e2af9f7bc5a22823b46be4d69 [file] [log] [blame]
Matthew Dempsky7da39482013-05-10 13:54:49 -07001# 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
21licenses(["unencumbered"])
22
Roberto Lublinerman37ff62f2016-09-27 13:39:25 -070023load("//third_party/java_src/gwt:build-macros.bzl", "AugmentedJar")
Matthew Dempsky7da39482013-05-10 13:54:49 -070024
Brian Slesinsky926c1082014-06-10 13:51:56 -070025# 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 Dempsky7da39482013-05-10 13:54:49 -070028java_library(
Brian Slesinsky926c1082014-06-10 13:51:56 -070029 name = "codeserver-bare",
Matthew Dempsky7da39482013-05-10 13:54:49 -070030 srcs = glob(["java/**/*.java"]),
31 resources = glob([
32 "java/**/*.html",
33 "java/**/*.ico",
34 "java/**/*.js",
35 ]),
36 deps = [
Brian Slesinsky926c1082014-06-10 13:51:56 -070037 # 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 Slesinsky13724c62014-09-03 17:15:50 -070044java_library(
45 name = "testlib",
46 testonly = 1,
Roberto Lublinerman204f6cb2014-09-18 12:34:42 -070047 srcs = glob(["javatests/**/*.java"]),
Brian Slesinsky13724c62014-09-03 17:15:50 -070048 deps = [
49 ":codeserver-bare",
John Stalcup5486a482014-09-30 11:44:09 -070050 "//java/com/google/common/collect",
Brian Slesinsky13724c62014-09-03 17:15:50 -070051 "//third_party/java/junit",
Roberto Lublinermandf6110c2015-03-12 12:08:09 -070052 "//third_party/java_src/gwt:gwt-testing",
John Stalcup5486a482014-09-30 11:44:09 -070053 "//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 Slesinsky13724c62014-09-03 17:15:50 -070056 ],
57)
58
John Stalcup6cdfe152014-09-30 14:38:15 -070059test_suite(
60 name = "tests",
61 tests = [
62 ":RecompilerTest",
63 ":SourceHandlerTest",
64 ],
65)
66
Brian Slesinsky13724c62014-09-03 17:15:50 -070067java_test(
John Stalcup6cdfe152014-09-30 14:38:15 -070068 name = "SourceHandlerTest",
Brian Slesinsky13724c62014-09-03 17:15:50 -070069 test_class = "com.google.gwt.dev.codeserver.SourceHandlerTest",
70 runtime_deps = [
71 ":testlib",
72 ],
73)
74
John Stalcup5486a482014-09-30 11:44:09 -070075java_test(
John Stalcup6cdfe152014-09-30 14:38:15 -070076 name = "RecompilerTest",
John Stalcup5486a482014-09-30 11:44:09 -070077 test_class = "com.google.gwt.dev.codeserver.RecompilerTest",
78 runtime_deps = [
79 ":testlib",
80 ],
81)
82
Brian Slesinsky926c1082014-06-10 13:51:56 -070083# Repackaged codeserver for google3.
84AugmentedJar(
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 Dempsky7da39482013-05-10 13:54:49 -070094 "//third_party/java_src/gwt:gwt-dev",
Matthew Dempsky4b007802013-11-12 19:41:59 -080095 "//third_party/java_src/gwt:gwt-dev-private",
Brian Slesinsky926c1082014-06-10 13:51:56 -070096 # The codeserver needs servlet_api_3. Be careful about adding dependencies.
Goktug Gokdogan6e31a152014-01-28 12:40:25 -080097 "//third_party/java_src/gwt/svn/tools:servlet_api_3",
Matthew Dempsky7da39482013-05-10 13:54:49 -070098 ],
Brian Slesinsky926c1082014-06-10 13:51:56 -070099 visibility = ["//java/com/google/gwt/dev/codeserver:__pkg__"],
Matthew Dempsky7da39482013-05-10 13:54:49 -0700100)
101
102# allow the top-level ant build to call us
103filegroup(
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)