blob: cb8e5185ac9094f339eda188a3afb39abb9e512f [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# Sample apps for GWT. (Mirrored to svn.)
17
18# Google owns the copyright
19licenses(["unencumbered"])
20
21package(
22 default_visibility = ["//third_party/java_src/gwt:__pkg__"],
23)
24
25subinclude("//third_party/java_src/gwt:build-macros")
26
27package_group(
28 name = "showcase_friends",
29 packages = ["//javatests/com/google/gwt/tourguide/..."],
30)
31
32# Files in this directory for running ant
33# Note: ant_test.sh replaces this build.xml file with its own stub.
34filegroup(
35 name = "ant",
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070036 srcs = glob([
37 "build.xml",
38 "**/*.java",
39 ]),
Matthew Dempsky7da39482013-05-10 13:54:49 -070040)
41
42Zip(
43 name = "hello-src.jar",
44 srcs = glob([
45 "hello/src/**/*.java",
46 "hello/src/**/*.xml",
47 ]),
48 root = "hello/src",
49 visibility = ["//third_party/java_src/gwt/svn/trunk/dev:__pkg__"],
50)
51
52# Allow friends to import the showcase app as a GWT module
53gwt_module(
54 name = "showcase_module",
55 extra_inherits = ["com.google.gwt.sample.showcase.Showcase"],
56 rename_to = "showcase",
57 visibility = [":showcase_friends"],
58 deps = [":showcase_lib"],
59)
60
61gwt_application(
62 name = "showcase_app",
63 module_target = ":showcase_module",
64)
65
66java_library(
67 name = "showcase_lib",
68 srcs = [":showcase.jar"],
69)
70
71AugmentedJar(
72 name = "showcase",
73 srcs = glob(
74 ["showcase/src/**/*.java"],
75 exclude_directories = 1,
76 ),
77 added_roots = ["showcase/src"],
78 deps = [
79 "//third_party/java_src/gwt",
80 "//third_party/java_src/gwt:gwt-dev",
81 ],
82)
83
84# Provides the contents of the showcase war directory as a handy zip file
85# (Doesn't include appengine-web.xml so you can replace it.)
86Zip(
87 name = "showcase-wardir.zip",
88 srcs = glob(
89 ["showcase/war/**"],
90 exclude = glob(["showcase/war/**/*~"]) + [
91 "showcase/war/WEB-INF/appengine-web.xml",
92 ],
93 ),
94 root = "showcase/war",
95 visibility = [":showcase_friends"],
96)