forked from gwtproject/gwt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
113 lines (100 loc) · 2.84 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Copyright 2012 Google Inc.
#
# 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.
# Description:
# Sample apps for GWT. (Mirrored to svn.)
# Google owns the copyright
licenses(["unencumbered"])
package(
default_visibility = ["//third_party/java_src/gwt:__pkg__"],
)
load("//third_party/java_src/gwt:build-macros.bzl", "AugmentedJar", "Zip")
package_group(
name = "showcase_friends",
packages = ["//javatests/com/google/gwt/tourguide/..."],
)
# Files in this directory for running ant
# Note: ant_test.sh replaces this build.xml file with its own stub.
filegroup(
name = "ant",
srcs = glob([
"build.xml",
"**/*.java",
]),
)
Zip(
name = "hello-src.jar",
srcs = glob([
"hello/src/**/*.java",
"hello/src/**/*.xml",
]),
root = "hello/src",
visibility = ["//third_party/java_src/gwt/svn/trunk/dev:__pkg__"],
)
# Allow friends to import the showcase app as a GWT module
gwt_module(
name = "showcase_module",
extra_inherits = ["com.google.gwt.sample.showcase.Showcase"],
rename_to = "showcase",
visibility = [":showcase_friends"],
deps = [":showcase_lib"],
)
gwt_application(
name = "showcase_app",
module_target = ":showcase_module",
)
java_library(
name = "showcase_lib",
srcs = [":showcase.srcjar"],
constraints = [
"gwt",
"public",
],
deps = [
"//third_party/java_src/gwt",
"//third_party/java_src/gwt:gwt-dev",
],
)
AugmentedJar(
name = "showcase",
srcs = glob(
["showcase/src/**/*.java"],
exclude_directories = 1,
),
added_roots = ["showcase/src"],
deps = [
"//third_party/java_src/gwt",
"//third_party/java_src/gwt:gwt-dev",
],
)
# we need to rename the jar file to end with .srcjar
# for it to be valid input into a java_library rule
genrule(
name = "rename_jar",
srcs = [":showcase.jar"],
outs = ["showcase.srcjar"],
cmd = "cp $(location :showcase.jar) $@",
)
# Provides the contents of the showcase war directory as a handy zip file
# (Doesn't include appengine-web.xml so you can replace it.)
Zip(
name = "showcase-wardir.zip",
srcs = glob(
["showcase/war/**"],
exclude = glob(["showcase/war/**/*~"]) + [
"showcase/war/WEB-INF/appengine-web.xml",
],
),
root = "showcase/war",
visibility = [":showcase_friends"],
)