forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install the latest version of bazel, and try building `bazel build java/client/src/org/openqa/selenium/remote` If everything goes according to plan, this will have built the remote java bindings. Woot. The design principles for the BUILD files are fairly simple: * Keep It Stupidly Simple (aim for one target per file) * Only use public visibility for rules that will generate a publicly downloadable artifect (eg. a maven jar, a ruby gem, etc) * Minimal visibility for everything else * Each rule should only be reachable from one publicly visible rule (allowing us to generate deployment descriptors when we get there) Problems to address before we can consider switching to bazel for all builds: * The publishing story is a mess. Notably, Buck made it easy to push to maven central. Bazel's a mess for this. * Generating java 9 module information. This is probably just a case of copying what we did for Buck. * How to properly integrate into the rest of the build, in particular for those languages we didn't properly cover off with Buck (though that's not a blocker --- feature parity with what we have is)
- Loading branch information
Showing
14 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# We target java 8 by default | ||
build --javacopt "-source 8" | ||
build --javacopt "-target 8" | ||
|
||
# Require java dependencies to be used and first-order | ||
build --strict_java_deps strict | ||
|
||
# Make sure we get something helpful when tests fail | ||
test --verbose_failures | ||
test --test_output=errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
java_library( | ||
name = "selenium", | ||
srcs = glob([ | ||
"*.java", | ||
"html5/*.java", | ||
"internal/*.java", | ||
"interactions/**/*.java", | ||
"logging/**/*.java", | ||
"mobile/*.java", | ||
]), | ||
deps = [ | ||
# Deliberately left empty of third party deps | ||
], | ||
visibility = [ | ||
"//visibility:public", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
java_library( | ||
name = "io", | ||
srcs = glob(["*.java"]), | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium", | ||
], | ||
visibility = [ | ||
"//java/client/src/org/openqa/selenium/os:__pkg__", | ||
"//java/client/src/org/openqa/selenium/remote:__pkg__", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
java_library( | ||
name = "json", | ||
srcs = glob(["*.java"]), | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium", | ||
"//java/client/src/org/openqa/selenium/remote:types", | ||
"//third_party/java/guava:guava", | ||
], | ||
visibility = [ | ||
"//java/client/src/org/openqa/selenium/remote:__pkg__", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
java_library( | ||
name = "net", | ||
srcs = glob(["*.java"]), | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium", | ||
"//third_party/java/guava", | ||
], | ||
visibility = [ | ||
"//java/client/src/org/openqa/selenium/remote:__pkg__", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
java_library( | ||
name = "os", | ||
srcs = glob(["*.java"]), | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//third_party/java/commons:commons-exec", | ||
"//third_party/java/guava", | ||
], | ||
visibility = [ | ||
"//java/client/src/org/openqa/selenium/remote:__pkg__", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
TYPE_SOURCES = [ | ||
"Command.java", | ||
"ErrorCodes.java", | ||
"Response.java", | ||
"ScreenshotException.java", | ||
"SessionId.java", | ||
] | ||
|
||
java_library( | ||
name = "remote", | ||
srcs = glob([ | ||
"*.java", | ||
"html5/*.java", | ||
"http/*.java", | ||
"internal/*.java", | ||
"mobile/*.java", | ||
"service/*.java", | ||
"session/*.java", | ||
], exclude = TYPE_SOURCES), | ||
exports = [ | ||
"//java/client/src/org/openqa/selenium", | ||
"//java/client/src/org/openqa/selenium/json", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//java/client/src/org/openqa/selenium/net", | ||
"//java/client/src/org/openqa/selenium/os", | ||
], | ||
deps = [ | ||
":types", | ||
"//java/client/src/org/openqa/selenium", | ||
"//java/client/src/org/openqa/selenium/json", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//java/client/src/org/openqa/selenium/net", | ||
"//java/client/src/org/openqa/selenium/os", | ||
"//third_party/java/bytebuddy:byte-buddy", | ||
"//third_party/java/guava", | ||
"//third_party/java/okhttp3:okhttp", | ||
], | ||
visibility = [ | ||
], | ||
) | ||
|
||
java_library( | ||
name = "types", | ||
srcs = TYPE_SOURCES, | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium", | ||
"//third_party/java/guava", | ||
], | ||
visibility = [ | ||
"//java/client/src/org/openqa/selenium/json:__pkg__", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
java_import( | ||
name = 'byte-buddy', | ||
jars = [ | ||
'byte-buddy-1.8.15.jar', | ||
], | ||
licenses = [ | ||
"notice", # Apache 2 | ||
], | ||
srcjar = 'byte-buddy-1.8.15-sources.jar', | ||
visibility = [ | ||
'//java/client/src/org/openqa/selenium/remote:__pkg__', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
java_import( | ||
name = 'commons-exec', | ||
licenses = [ | ||
"notice", # Apache 2 | ||
], | ||
jars = [ | ||
'commons-exec-1.3.jar', | ||
], | ||
srcjar = 'commons-exec-1.3-sources.jar', | ||
visibility = [ | ||
'//java/client/src/org/openqa/selenium/os:__pkg__', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
java_import( | ||
name = "guava", | ||
licenses = [ | ||
"notice", # Apache 2 | ||
], | ||
jars = [ | ||
"guava-25.0-jre.jar", | ||
], | ||
visibility = [ | ||
"//visibility:public", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
java_import( | ||
name = 'okhttp', | ||
licenses = [ | ||
"notice" # Apache 2 | ||
], | ||
jars = [ | ||
'okhttp-3.11.0.jar', | ||
], | ||
srcjar = 'okhttp-3.11.0-sources.jar', | ||
deps = [ | ||
'//third_party/java/okio:okio' | ||
], | ||
visibility = [ | ||
'//java/client/src/org/openqa/selenium/remote:__pkg__', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
java_import( | ||
name = 'okio', | ||
licenses = [ | ||
"notice", # Apache 2 | ||
], | ||
jars = [ | ||
'okio-1.14.0.jar', | ||
], | ||
srcjar = 'okio-1.14.0-sources.jar', | ||
visibility = [ | ||
'//third_party/java/okhttp3:__pkg__' | ||
], | ||
) |