aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--third_party/BUILD589
-rw-r--r--third_party/README.md289
-rw-r--r--third_party/checker_framework_dataflow/BUILD25
-rw-r--r--third_party/checker_framework_javacutil/BUILD22
-rw-r--r--third_party/css/bootstrap/BUILD24
-rw-r--r--third_party/css/bootstrap/README.md4
-rw-r--r--third_party/css/font_awesome/BUILD22
-rw-r--r--third_party/css/font_awesome/README.md4
-rw-r--r--third_party/grpc/BUILD544
-rw-r--r--third_party/grpc/README.bazel.md22
-rw-r--r--third_party/ijar/BUILD77
-rw-r--r--third_party/ijar/test/BUILD211
-rwxr-xr-xthird_party/ijar/test/testenv.sh38
-rw-r--r--third_party/iossim/BUILD12
-rw-r--r--third_party/java/android_databinding/BUILD32
-rw-r--r--third_party/java/aosp_gradle_core/BUILD20
-rw-r--r--third_party/java/apkbuilder/BUILD32
-rw-r--r--third_party/java/apkbuilder/BUILD.tools15
-rw-r--r--third_party/java/buck-ios-support/BUILD21
-rw-r--r--third_party/java/dd_plist/BUILD14
-rw-r--r--third_party/java/j2objc/BUILD51
-rw-r--r--third_party/java/j2objc/BUILD.remote54
-rw-r--r--third_party/java/jarjar/BUILD19
-rw-r--r--third_party/java/jdk/README.md23
-rw-r--r--third_party/java/jdk/javabuilder/BUILD13
-rw-r--r--third_party/java/jdk/langtools/BUILD49
-rw-r--r--third_party/javascript/bootstrap/BUILD16
-rw-r--r--third_party/javascript/bootstrap/README.md4
-rw-r--r--third_party/jformatstring/BUILD20
-rw-r--r--third_party/nanopb/BUILD15
-rw-r--r--third_party/protobuf/3.0.0/BUILD316
-rw-r--r--third_party/protobuf/3.0.0/com_google_protobuf_java.BUILD11
-rw-r--r--third_party/protobuf/BUILD33
-rw-r--r--third_party/protobuf/README.md28
-rw-r--r--third_party/protobuf/proto_alias.bzl18
-rw-r--r--third_party/py/concurrent/BUILD13
-rw-r--r--third_party/py/concurrent/README.md8
-rw-r--r--third_party/py/gflags/BUILD17
-rw-r--r--third_party/py/gflags/README.md6
-rw-r--r--third_party/py/mock/BUILD13
-rw-r--r--third_party/py/mock/README.md6
-rw-r--r--third_party/py/six/BUILD15
-rw-r--r--third_party/py/six/README.md6
-rw-r--r--third_party/zlib/BUILD16
44 files changed, 2787 insertions, 0 deletions
diff --git a/third_party/BUILD b/third_party/BUILD
new file mode 100644
index 0000000000..d57f0dfd44
--- /dev/null
+++ b/third_party/BUILD
@@ -0,0 +1,589 @@
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]) + [
+ "//third_party/css/bootstrap:srcs",
+ "//third_party/css/font_awesome:srcs",
+ "//third_party/ijar:srcs",
+ "//third_party/iossim:srcs",
+ "//third_party/grpc:srcs",
+ "//third_party/java/android_databinding:srcs",
+ "//third_party/java/aosp_gradle_core:srcs",
+ "//third_party/java/apkbuilder:srcs",
+ "//third_party/java/buck-ios-support:srcs",
+ "//third_party/java/dd_plist:srcs",
+ "//third_party/java/j2objc:srcs",
+ "//third_party/java/jacoco:srcs",
+ "//third_party/java/jarjar:srcs",
+ "//third_party/java/jdk/langtools:srcs",
+ "//third_party/java/jdk/javabuilder:srcs",
+ "//third_party/javascript/bootstrap:srcs",
+ "//third_party/checker_framework_dataflow:srcs",
+ "//third_party/checker_framework_javacutil:srcs",
+ "//third_party/jformatstring:srcs",
+ "//third_party/protobuf:srcs",
+ "//third_party/py/concurrent:srcs",
+ "//third_party/py/gflags:srcs",
+ "//third_party/py/mock:srcs",
+ "//third_party/py/six:srcs",
+ "//third_party/zlib:srcs",
+ "//third_party/nanopb:srcs",
+ ],
+)
+
+# Filegroup to ship the sources to the Bazel embededded tools
+# This filegroup should contains all GPL with classpath exception
+# and LGPL code that we use in Bazel.
+filegroup(
+ name = "gpl-srcs",
+ srcs = [
+ "//third_party/checker_framework_dataflow:srcs",
+ "//third_party/checker_framework_javacutil:srcs",
+ "//third_party/jformatstring:srcs",
+ ],
+)
+
+filegroup(
+ name = "d3-js",
+ srcs = glob(["javascript/d3/**/*.js"]),
+)
+
+filegroup(
+ name = "jquery",
+ srcs = glob(["javascript/jquery/**/*.jslib"]),
+)
+
+java_import(
+ name = "aether",
+ jars = [
+ "aether/aether-api-1.0.0.v20140518.jar",
+ "aether/aether-spi-1.0.0.v20140518.jar",
+ "aether/aether-transport-http-1.0.0.v20140518.jar",
+ "aether/aether-connector-basic-1.0.0.v20140518.jar",
+ "aether/aether-transport-classpath-1.0.0.v20140518.jar",
+ "aether/aether-transport-wagon-1.0.0.v20140518.jar",
+ "aether/aether-impl-1.0.0.v20140518.jar",
+ "aether/aether-transport-file-1.0.0.v20140518.jar",
+ "aether/aether-util-1.0.0.v20140518.jar",
+ ],
+)
+
+java_import(
+ name = "android_common_25_0_0",
+ jars = [
+ "android_common/com.android_annotations_25.0.0.jar",
+ "android_common/com.android.tools.build_builder_2.0.0.jar",
+ "android_common/com.android.tools.build_builder-model_2.0.0.jar",
+ "android_common/com.android.tools.build_builder-test-api_2.0.0.jar",
+ "android_common/com.android.tools.build_manifest-merger_25.0.0.jar",
+ "android_common/com.android.tools.external.lombok_lombok-ast_0.2.3.jar",
+ "android_common/com.android.tools.layoutlib_layoutlib_25.0.0.jar",
+ "android_common/com.android.tools.lint_lint-api_25.0.0.jar",
+ "android_common/com.android.tools.lint_lint-checks_25.0.0.jar",
+ "android_common/com.android.tools_common_25.0.0.jar",
+ "android_common/com.android.tools_ddmlib_25.0.0.jar",
+ "android_common/com.android.tools_dvlib_25.0.0.jar",
+ "android_common/com.android.tools_repository_25.0.0.jar",
+ "android_common/com.android.tools_sdk-common_25.0.0.jar",
+ "android_common/com.android.tools_sdklib_25.0.0.jar",
+ ],
+ runtime_deps = [
+ ":asm",
+ ":asm-analysis",
+ ":asm-tree",
+ ],
+)
+
+java_import(
+ name = "apache_commons_codec",
+ jars = ["apache_commons_codec/commons-codec-1.9.jar"],
+)
+
+java_import(
+ name = "apache_commons_collections",
+ jars = ["apache_commons_collections/commons-collections-3.2.2.jar"],
+)
+
+java_import(
+ name = "apache_commons_lang",
+ jars = ["apache_commons_lang/commons-lang-2.6.jar"],
+)
+
+java_import(
+ name = "apache_commons_compress",
+ jars = ["apache_commons_compress/apache-commons-compress-1.9.jar"],
+)
+
+java_import(
+ name = "apache_commons_logging",
+ jars = ["apache_commons_logging/commons-logging-1.1.1.jar"],
+)
+
+java_import(
+ name = "apache_commons_pool2",
+ jars = ["apache_commons_pool2/commons-pool2-2.3.jar"],
+)
+
+java_import(
+ name = "apache_httpclient",
+ jars = ["apache_httpclient/httpclient-4.2.5.jar"],
+)
+
+java_import(
+ name = "apache_httpcore",
+ jars = ["apache_httpcore/httpcore-4.2.4.jar"],
+)
+
+java_import(
+ name = "apache_velocity",
+ jars = ["apache_velocity/velocity-1.7.jar"],
+ deps = [
+ ":apache_commons_collections",
+ ":apache_commons_lang",
+ ],
+)
+
+java_import(
+ name = "asm",
+ jars = ["asm/asm-5.0.4.jar"],
+)
+
+java_import(
+ name = "asm-analysis",
+ jars = ["asm/asm-analysis-5.0.4.jar"],
+ runtime_deps = [":asm-tree"],
+)
+
+java_import(
+ name = "asm-commons",
+ jars = ["asm/asm-commons-5.0.4.jar"],
+ runtime_deps = [":asm-tree"],
+)
+
+java_import(
+ name = "asm-tree",
+ jars = ["asm/asm-tree-5.0.4.jar"],
+ runtime_deps = [":asm"],
+)
+
+java_import(
+ name = "asm-util",
+ jars = ["asm/asm-util-5.0.4.jar"],
+ runtime_deps = [":asm-tree"],
+)
+
+java_plugin(
+ name = "auto_annotation_plugin",
+ processor_class = "com.google.auto.value.processor.AutoAnnotationProcessor",
+ deps = [
+ ":apache_commons_collections",
+ ":apache_velocity",
+ ":asm",
+ ":auto_common",
+ ":auto_service",
+ ":auto_value_value",
+ ":guava",
+ ":jsr305",
+ ":tomcat_annotations_api",
+ ],
+)
+
+java_import(
+ name = "auto_common",
+ jars = ["auto/auto-common-0.3.jar"],
+)
+
+java_import(
+ name = "auto_service",
+ jars = ["auto/auto-service-1.0-rc2.jar"],
+)
+
+java_plugin(
+ name = "auto_service_plugin",
+ processor_class = "com.google.auto.service.processor.AutoServiceProcessor",
+ deps = [
+ ":auto_common",
+ ":auto_service",
+ ":guava",
+ ],
+)
+
+java_plugin(
+ name = "auto_value_plugin",
+ processor_class = "com.google.auto.value.processor.AutoValueProcessor",
+ deps = [
+ ":apache_commons_collections",
+ ":apache_velocity",
+ ":asm",
+ ":auto_common",
+ ":auto_service",
+ ":auto_value_value",
+ ":guava",
+ ":tomcat_annotations_api",
+ ],
+)
+
+java_library(
+ name = "auto_value",
+ exported_plugins = [
+ ":auto_annotation_plugin",
+ ":auto_value_plugin",
+ ],
+ exports = [
+ ":auto_value_value",
+ ":tomcat_annotations_api",
+ ],
+)
+
+java_import(
+ name = "auto_value_value",
+ jars = ["auto/auto-value-1.2.jar"],
+)
+
+# For bootstrapping JavaBuilder
+filegroup(
+ name = "auto_value-jars",
+ srcs = ["auto/auto-value-1.2.jar"],
+)
+
+java_library(
+ name = "dagger",
+ exported_plugins = [":dagger_plugin"],
+ exports = [
+ ":dagger_api",
+ ":jsr330_inject",
+ ],
+)
+
+java_plugin(
+ name = "dagger_plugin",
+ processor_class = "dagger.internal.codegen.ComponentProcessor",
+ deps = [
+ ":dagger_api",
+ ":dagger_compiler",
+ ":dagger_producers",
+ ":guava",
+ ":jsr330_inject",
+ ],
+)
+
+java_import(
+ name = "dagger_api",
+ jars = ["dagger/dagger-2.5.jar"],
+)
+
+java_import(
+ name = "dagger_compiler",
+ jars = ["dagger/dagger-compiler-2.5.jar"],
+)
+
+java_import(
+ name = "dagger_producers",
+ jars = ["dagger/dagger-producers-2.5.jar"],
+)
+
+java_import(
+ name = "bytebuddy",
+ jars = ["bytebuddy/byte-buddy-dep-0.7-rc6.jar"],
+ deps = [
+ ":asm",
+ ":asm-commons",
+ ":asm-util",
+ ],
+)
+
+java_import(
+ name = "gson",
+ jars = ["gson/gson-2.2.4.jar"],
+)
+
+java_import(
+ name = "hazelcast",
+ jars = [
+ "hazelcast/hazelcast-3.6.4.jar",
+ "hazelcast/hazelcast-client-3.6.4.jar",
+ ],
+)
+
+java_import(
+ name = "error_prone",
+ jars = [
+ "error_prone/error_prone_core-2.0.13.jar",
+ "error_prone/error_prone_annotations-2.0.13.jar",
+ "error_prone/error_prone_annotation-2.0.13.jar",
+ ],
+ exports = [
+ ":guava",
+ ":jcip_annotations",
+ ":jsr305",
+ ":pcollections",
+ "//third_party/checker_framework_dataflow",
+ "//third_party/jformatstring",
+ ],
+)
+
+java_import(
+ name = "jcip_annotations",
+ jars = [
+ "jcip_annotations/jcip-annotations-1.0-1.jar",
+ ],
+)
+
+java_import(
+ name = "pcollections",
+ jars = [
+ "pcollections/pcollections-2.1.2.jar",
+ ],
+)
+
+filegroup(
+ name = "guava_and_error_prone-jars",
+ srcs = [
+ "guava/guava-21.0-20161101.jar",
+ "error_prone/error_prone_annotation-2.0.13.jar",
+ "error_prone/error_prone_annotations-2.0.13.jar",
+ # error_prone_core contains a copy of an earlier version of guava, so
+ # it's very important that it occur *after* the guava jar in the
+ # -classpath arg for both 'javac' and 'java'. The latter is especially
+ # important when dealing with pre-built jars that themselves assume
+ # they'll be provided guava classes at runtime via -classpath (e.g.
+ # guava-testlib uses stuff from guava).
+ "error_prone/error_prone_core-2.0.13.jar",
+ "jcip_annotations/jcip-annotations-1.0-1.jar",
+ "jsr305/jsr-305.jar",
+ "pcollections/pcollections-2.1.2.jar",
+ "//third_party/checker_framework_dataflow",
+ "//third_party/jformatstring",
+ ],
+)
+
+# For bootstrapping JavaBuilder
+filegroup(
+ name = "bootstrap_guava_and_error_prone-jars",
+ srcs = [
+ "guava/guava-21.0-20161101.jar",
+ "error_prone/error_prone_annotation-2.0.13.jar",
+ "error_prone/error_prone_annotations-2.0.13.jar",
+ # See the comment about error_prone_core in 'guava_and_error_prone-jars'
+ # above.
+ "error_prone/error_prone_core-2.0.13.jar",
+ "jcip_annotations/jcip-annotations-1.0-1.jar",
+ "jsr305/jsr-305.jar",
+ "pcollections/pcollections-2.1.2.jar",
+ "//third_party/checker_framework_dataflow:bootstrap",
+ "//third_party/jformatstring:bootstrap",
+ ],
+)
+
+# As of Guava 20.0, Guava code uses Error Prone annotations. This isn't a
+# problem when compiling with java 8, but is a problem when compiling Bazel
+# with java 7 (the Error Prone jars need to be on the javac classpath). So,
+# until we drop support for compiling Bazel with java 7, we unfortunately need
+# to ensure that the Error Prone jars are always used together with the Guava
+# jars.
+java_import(
+ name = "guava",
+ jars = [":guava_and_error_prone-jars"],
+)
+
+# For bootstrapping JavaBuilder
+filegroup(
+ name = "guava-jars",
+ srcs = ["guava/guava-21.0-20161101.jar"],
+)
+
+java_import(
+ name = "jgit",
+ jars = ["jgit/org.eclipse.jgit-4.0.1.201506240215-r.jar"],
+)
+
+java_import(
+ name = "jimfs",
+ jars = ["jimfs/jimfs-1.1-rc1.jar"],
+)
+
+java_import(
+ name = "joda_time",
+ jars = ["joda_time/joda-time-2.3.jar"],
+)
+
+java_import(
+ name = "jsch",
+ jars = ["jsch/jsch-0.1.51.jar"],
+)
+
+java_import(
+ name = "jsr305",
+ jars = ["jsr305/jsr-305.jar"],
+)
+
+# For bootstrapping JavaBuilder
+filegroup(
+ name = "jsr305-jars",
+ srcs = ["jsr305/jsr-305.jar"],
+)
+
+java_import(
+ name = "jsr330_inject",
+ jars = ["jsr330_inject/javax.inject.jar"],
+)
+
+java_import(
+ name = "maven",
+ jars = glob(["maven/*.jar"]),
+)
+
+java_import(
+ name = "maven_model",
+ jars = [
+ "maven_model/maven-aether-provider-3.2.3.jar",
+ "maven_model/maven-model-3.2.3.jar",
+ "maven_model/maven-model-builder-3.2.3.jar",
+ "maven_model/maven-repository-metadata-3.2.3.jar",
+ ],
+)
+
+java_import(
+ name = "netty",
+ jars = ["netty/netty-all-4.1.0.CR6.jar"],
+)
+
+java_import(
+ name = "plexus_component_annotations",
+ jars = ["plexus_component_annotations/plexus-component-annotations-1.6.jar"],
+)
+
+java_import(
+ name = "plexus_interpolation",
+ jars = ["plexus_interpolation/plexus-interpolation-1.22.jar"],
+)
+
+java_import(
+ name = "plexus_utils",
+ jars = ["plexus_utils/plexus-utils-3.0.21.jar"],
+)
+
+java_import(
+ name = "slf4j",
+ jars = [
+ "slf4j/slf4j-api-1.7.7.jar",
+ "slf4j/slf4j-jdk14-1.7.7.jar",
+ ],
+)
+
+java_import(
+ name = "tomcat_annotations_api",
+ jars = ["tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar"],
+)
+
+# Testing
+
+java_import(
+ name = "guava-testlib",
+ jars = ["guava/guava-testlib-21.0-20161101.jar"],
+)
+
+java_import(
+ name = "junit4",
+ jars = [
+ "hamcrest/hamcrest-core-1.3.jar",
+ "junit/junit-4.11.jar",
+ ],
+)
+
+java_import(
+ name = "mockito",
+ jars = ["mockito/mockito-all-1.10.19.jar"],
+)
+
+java_import(
+ name = "truth",
+ jars = ["truth/truth-0.28.jar"],
+)
+
+java_import(
+ name = "xz",
+ jars = ["xz/xz-1.5.jar"],
+)
+
+cc_library(
+ name = "gtest",
+ srcs = [
+ "gtest/gtest-all.cc",
+ "gtest/gtest_main.cc",
+ ],
+ hdrs = [
+ "gtest/gtest.h",
+ ],
+ data = [
+ "//tools:test_sharding_compliant",
+ ],
+ includes = ["."],
+ # gtest detects pthread, and the linker fails without it.
+ linkopts = ["-lpthread"],
+)
+
+# To be used by the skylark example.
+filegroup(
+ name = "junit4-jars",
+ srcs = [
+ "hamcrest/hamcrest-core-1.3.jar",
+ "junit/junit-4.11.jar",
+ ],
+)
+
+config_setting(
+ name = "windows_mingw",
+ values = {"compiler": "windows_mingw"},
+)
+
+config_setting(
+ name = "windows_msys64",
+ values = {"compiler": "windows_msys64"},
+)
+
+config_setting(
+ name = "windows_msys64_mingw64",
+ values = {"compiler": "windows_msys64_mingw64"},
+)
+
+config_setting(
+ name = "windows_clang",
+ values = {"compiler": "windows_clang"},
+)
+
+config_setting(
+ name = "darwin",
+ values = {"host_cpu": "darwin"},
+)
+
+config_setting(
+ name = "k8",
+ values = {"host_cpu": "k8"},
+)
+
+config_setting(
+ name = "piii",
+ values = {"host_cpu": "piii"},
+)
+
+config_setting(
+ name = "arm",
+ values = {"host_cpu": "arm"},
+)
+
+config_setting(
+ name = "freebsd",
+ values = {"host_cpu": "freebsd"},
+)
+
+config_setting(
+ name = "s390x",
+ values = {"host_cpu": "s390x"},
+)
+
+config_setting(
+ name = "ppc",
+ values = {"host_cpu": "ppc"},
+)
diff --git a/third_party/README.md b/third_party/README.md
new file mode 100644
index 0000000000..fca6880f96
--- /dev/null
+++ b/third_party/README.md
@@ -0,0 +1,289 @@
+This file lists license and version information of all code we did not
+author, but ship together with the source so building Bazel requires
+a minimal set of extra dependencies.
+
+
+## [aether](http://eclipse.org/aether/)
+
+* Version: 1.0.0 v20140518
+* License: Eclipse Public License
+
+
+## [android_common](http://mvnrepository.com/artifact/com.android.tools/sdk-common)
+
+* Version: 25.0.0
+* License: Apache License 2.0.
+
+
+## [apache_commons_codec](http://commons.apache.org/proper/commons-codec/)
+
+* Version: 1.9
+* License: Apache License 2.0.
+
+
+## [apache_commons_collections](http://commons.apache.org/proper/commons-collections/)
+
+* Version: 3.2.2
+* License: Apache License 2.0.
+
+
+## [apache_commons_compress](http://commons.apache.org/proper/commons-compress/)
+
+* Version: 1.9
+* License: Apache License 2.0.
+
+
+## [apache_commons_logging](http://commons.apache.org/proper/commons-logging/)
+
+* Version: 1.1.1
+* License: Apache License 2.0.
+
+## [apache_commons_pool2](https://commons.apache.org/proper/commons-pool/)
+
+* Version: 2.3
+* License: Apache License 2.0.
+
+
+## [apache_httpclient](http://hc.apache.org/httpclient-3.x/)
+
+* Version: 4.2.5
+* License: Apache License 2.0
+
+
+## [apache_httpcore](https://hc.apache.org/httpcomponents-core-ga/)
+
+* Version: 4.2.4
+* License: Apache License 2.0
+
+
+## [apache_velocity](http://velocity.apache.org/)
+
+* Version: 1.7
+* License: Apache License 2.0.
+
+
+## apkbuilder
+
+* [apkbuilder](http://search.maven.org/remotecontent?filepath=com/android/tools/sdklib/25.0.0/sdklib-25.0.0-sources.jar)
+* [android common](http://search.maven.org/remotecontent?filepath=com/android/tools/sdk-common/25.0.0/sdk-common-25.0.0-sources.jar)
+* Version: 25.0.0
+* License: Apache License 2.0.
+
+
+## [asm](https://asm.ow2.org)
+
+* Version: 5.0.4
+* License: 3-clause revised BSD
+
+
+## [auto](https://github.com/google/auto)
+
+* [auto_common](https://github.com/google/auto/tree/master/common) (version 0.3)
+* [auto_service](https://github.com/google/auto/tree/master/service) (version 1.0-rc2)
+* [auto_value](https://github.com/google/auto/tree/master/value) (version 1.0)
+* License: Apache License 2.0
+
+
+## [bytebuddy](https://github.com/raphw/byte-buddy)
+
+* Version: 0.7-rc6
+* License: Apache License 2.0
+
+
+## [Google's Dagger](https://github.com/google/dagger)
+
+* Version: 2.5
+* License: Apache License 2.0
+
+## [Error Prone](https://github.com/google/error-prone)
+
+* Version: 2.0.13
+* License: Apache License 2.0
+
+
+## [JCIP Annotations](https://github.com/stephenc/jcip-annotations/)
+
+* Version: 1.0-1
+* License: Apache License 2.0
+
+
+## [PCollections](https://github.com/pcollections/pcollections/)
+
+* Version: 2.1.2
+* License: MIT
+
+
+## [jFormatString](https://code.google.com/p/j-format-string/)
+
+* Version: 3.0.0
+* License: GNU GPL v2 with Classpath exception
+
+## [Checker Framework Dataflow](http://code.google.com/p/checker-framework/)
+
+* Version: 1.8.10
+* License: GNU GPL v2 with Classpath exception, portions MIT
+
+## [Checker Framework Javacutil](http://code.google.com/p/checker-framework/)
+
+* Version: 1.8.10
+* License: GNU GPL v2 with Classpath exception, portions MIT
+
+## [Buck (iOS support)](http://facebook.github.io/buck/)
+
+* Version: commit id 2ff4f45a971776afcfbe88333d78c4ca6bf03df9
+* License: Apache License 2.0
+
+
+## [dd_plist](http://plist.googlecode.com/svn-history/r111/trunk/)
+
+* Version: r111
+* License: MIT license
+
+
+## [protobuf-java](https://code.google.com/p/protobuf/)
+
+* Version: 2.5.0
+* License: New BSD License
+
+
+## [gtest](https://code.google.com/p/googletest/)
+
+* Version: 1.7.0
+* License: New BSD License
+
+
+## [gson](https://code.google.com/p/google-gson/)
+
+* Version: 2.2.4
+* License: Apache License 2.0
+
+
+## [guava](https://code.google.com/p/guava-libraries/)
+
+* Version: 19.0
+* License: Apache License 2.0
+
+
+## [javac](https://github.com/google/error-prone-javac)
+
+* Version: 1.9.0-dev-r2973-2 (javac7.jar) and 1.9.0-dev-r2644-2 (javac-9-dev-r3297-1.jar)
+* License: GNU GPL v2 with Classpath exception (plus other licenses, see third_party/java/jdk/langtools/LICENSE file).
+
+## [jarjar](https://code.google.com/p/jarjar/)
+
+* Version: 1.4
+* License: Apache License 2.0
+
+
+## [jgit](https://eclipse.org/jgit/)
+
+* Version: 4.0.1.201506240215-r
+* License: Eclipse Distribution License 1.0
+
+
+## [joda_time](http://www.joda.org/joda-time/)
+
+* Version: 2.3
+* License: Apache License 2.0
+
+
+## [jsr250](https://repository.apache.org/content/repositories/orgapachetomcat-002)
+
+* Version: 8.0.5
+* License: Apache License 2.0
+
+
+## [jsch](http://www.jcraft.com/jsch/)
+
+* Version: 0.1.51
+* License: BSD-style license
+
+
+## [jsr305](https://code.google.com/p/jsr-305/)
+
+* Version: latest as of 2014-05-07
+* License: New BSD License
+
+
+## [jsr330_inject](https://code.google.com/p/atinject/)
+
+* Version: 1
+* License: Apache License 2.0
+
+
+## [maven](http://mvnrepository.com/artifact/org.apache.maven)
+
+* Version: 3.3.3
+* License: Apache License 2.0
+
+
+## [maven_model](http://maven.apache.org/ref/3.2.3/maven-model/)
+
+* Version: 3.2.3
+* License: Apache License 2.0
+
+
+## [plexus_component_annotations](http://mvnrepository.com/artifact/org.codehaus.plexus/plexus-component-annotations)
+
+* Version: 1.6
+* License: Apache License 2.0
+
+## [plexus_interpolation](http://mvnrepository.com/artifact/org.codehaus.plexus/plexus-interpolation)
+
+* Version: 1.22
+* License: Apache License 2.0
+
+
+## [plexus_utils](http://mvnrepository.com/artifact/org.codehaus.plexus/plexus-utils)
+
+* Version: 3.0.21
+* License: Apache License 2.0
+
+
+## [slf4j](http://www.slf4j.org/)
+
+* Version: 1.7.7
+* License: MIT license
+
+
+## [hazelcast](http://hazelcast.org/)
+
+* Version: 3.6.4
+* License: Apache License 2.0
+
+
+# Testing
+
+## [hamcrest](https://code.google.com/p/hamcrest/)
+
+* Version: 1.3
+* License: New BSD License
+
+
+## [iossim](https://code.google.com/p/chromium/codesearch#chromium/src/testing/iossim/)
+
+* Version: latest as of 2015-10-09
+* License: 3-clause BSD
+
+
+## [junit](http://junit.org/)
+
+* Version: 4.11
+* License: Eclipse Public License Version 1.0
+
+
+## [truth](http://google.github.io/truth/)
+
+* Version: 0.28
+* License: Apache License 2.0
+
+## [xz](http://tukaani.org/xz/java.html)
+
+* Version: 1.5
+* License: Public Domain
+
+## [netty](http://netty.io/)
+
+* Version: 4.1.0.CR4
+* License: Apache License 2.0
+
diff --git a/third_party/checker_framework_dataflow/BUILD b/third_party/checker_framework_dataflow/BUILD
new file mode 100644
index 0000000000..5bcebeb7cb
--- /dev/null
+++ b/third_party/checker_framework_dataflow/BUILD
@@ -0,0 +1,25 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["restricted"]) # GNU GPL v2 with Classpath exception
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+java_library(
+ name = "checker_framework_dataflow",
+ srcs = glob(["java/**"]),
+ deps = [
+ "//third_party/checker_framework_javacutil",
+ "@local_jdk//:langtools-neverlink",
+ ],
+)
+
+load("//tools/build_rules:java_rules_skylark.bzl", "bootstrap_java_library")
+
+bootstrap_java_library(
+ name = "bootstrap",
+ srcs = glob(["java/**"]),
+ deps = ["//third_party/checker_framework_javacutil:bootstrap"],
+)
diff --git a/third_party/checker_framework_javacutil/BUILD b/third_party/checker_framework_javacutil/BUILD
new file mode 100644
index 0000000000..cc18ab2020
--- /dev/null
+++ b/third_party/checker_framework_javacutil/BUILD
@@ -0,0 +1,22 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["restricted"]) # GNU GPL v2 with Classpath exception
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+java_library(
+ name = "checker_framework_javacutil",
+ srcs = glob(["java/**"]),
+ deps = ["@local_jdk//:langtools-neverlink"],
+)
+
+load("//tools/build_rules:java_rules_skylark.bzl", "bootstrap_java_library")
+
+bootstrap_java_library(
+ name = "bootstrap",
+ srcs = glob(["java/**"]),
+ neverlink_jars = ["@local_jdk//:langtools"],
+)
diff --git a/third_party/css/bootstrap/BUILD b/third_party/css/bootstrap/BUILD
new file mode 100644
index 0000000000..42c7a9dd1d
--- /dev/null
+++ b/third_party/css/bootstrap/BUILD
@@ -0,0 +1,24 @@
+licenses(["notice"]) # MIT
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+filegroup(
+ name = "bootstrap_css",
+ srcs = [
+ "css/bootstrap.css",
+ "css/bootstrap.css.map",
+ "css/bootstrap.min.css",
+ "css/bootstrap.min.css.map",
+ ],
+ visibility = ["//site:__pkg__"],
+)
+
+filegroup(
+ name = "bootstrap_images",
+ srcs = glob(["fonts/glyphicons-halflings-regular.*"]),
+ visibility = ["//site:__pkg__"],
+)
diff --git a/third_party/css/bootstrap/README.md b/third_party/css/bootstrap/README.md
new file mode 100644
index 0000000000..d7aae57b44
--- /dev/null
+++ b/third_party/css/bootstrap/README.md
@@ -0,0 +1,4 @@
+## [Bootstrap](https://github.com/twbs/bootstrap)
+
+* Version: 3.3.6
+* License: MIT
diff --git a/third_party/css/font_awesome/BUILD b/third_party/css/font_awesome/BUILD
new file mode 100644
index 0000000000..a58e75ed7a
--- /dev/null
+++ b/third_party/css/font_awesome/BUILD
@@ -0,0 +1,22 @@
+licenses(["notice"]) # MIT, fonts under OFL 1.1
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+filegroup(
+ name = "font_awesome_css",
+ srcs = [
+ "css/font-awesome.css",
+ "css/font-awesome.min.css",
+ ],
+ visibility = ["//site:__pkg__"],
+)
+
+filegroup(
+ name = "font_awesome_font",
+ srcs = glob(["fonts/fontawesome-webfont.*"]),
+ visibility = ["//site:__pkg__"],
+)
diff --git a/third_party/css/font_awesome/README.md b/third_party/css/font_awesome/README.md
new file mode 100644
index 0000000000..4f3fe0597d
--- /dev/null
+++ b/third_party/css/font_awesome/README.md
@@ -0,0 +1,4 @@
+## [Font Awesome](https://github.com/FortAwesome/Font-Awesome)
+
+* Version: 4.6.1
+* License: Font under SIL OFL 1.1, CSS under MIT
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
new file mode 100644
index 0000000000..386813e52e
--- /dev/null
+++ b/third_party/grpc/BUILD
@@ -0,0 +1,544 @@
+licenses(["unencumbered"])
+
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+java_import(
+ name = "grpc-jar",
+ jars = [
+ "grpc-netty-0.15.0.jar",
+ "grpc-protobuf-0.15.0.jar",
+ "grpc-protobuf-lite-0.15.0.jar",
+ "grpc-stub-0.15.0.jar",
+ "grpc-core-0.15.0.jar",
+ ],
+ runtime_deps = ["//third_party:netty"],
+)
+
+cc_binary(
+ name = "grpc-java-plugin",
+ srcs = [
+ "compiler/src/java_plugin/cpp/java_generator.cpp",
+ "compiler/src/java_plugin/cpp/java_generator.h",
+ "compiler/src/java_plugin/cpp/java_plugin.cpp",
+ ],
+ copts = ["-w"],
+ deps = ["//third_party/protobuf:protoc_lib"],
+)
+
+cc_binary(
+ name = "cpp_plugin",
+ srcs = [
+ "src/compiler/config.h",
+ "src/compiler/cpp_generator.cc",
+ "src/compiler/cpp_generator.h",
+ "src/compiler/cpp_generator_helpers.h",
+ "src/compiler/cpp_plugin.cc",
+ "src/compiler/generator_helpers.h",
+ ] + glob(["include/**/*.h"]),
+ copts = [
+ "-Ithird_party/grpc/include",
+ "-Ithird_party/grpc",
+ ],
+ linkopts = [
+ "-lm",
+ ],
+ visibility = ["//visibility:public"],
+ deps = ["//third_party/protobuf:protoc_lib"],
+)
+
+cc_library(
+ name = "grpc_unsecure",
+ srcs = [
+ "src/core/census/aggregation.h",
+ "src/core/census/context.c",
+ "src/core/census/grpc_context.c",
+ "src/core/census/grpc_filter.c",
+ "src/core/census/grpc_filter.h",
+ "src/core/census/initialize.c",
+ "src/core/census/operation.c",
+ "src/core/census/placeholders.c",
+ "src/core/census/rpc_metric_id.h",
+ "src/core/census/tracing.c",
+ "src/core/channel/channel_args.c",
+ "src/core/channel/channel_args.h",
+ "src/core/channel/channel_stack.c",
+ "src/core/channel/channel_stack.h",
+ "src/core/channel/client_channel.c",
+ "src/core/channel/client_channel.h",
+ "src/core/channel/client_uchannel.c",
+ "src/core/channel/client_uchannel.h",
+ "src/core/channel/compress_filter.c",
+ "src/core/channel/compress_filter.h",
+ "src/core/channel/connected_channel.c",
+ "src/core/channel/connected_channel.h",
+ "src/core/channel/context.h",
+ "src/core/channel/http_client_filter.c",
+ "src/core/channel/http_client_filter.h",
+ "src/core/channel/http_server_filter.c",
+ "src/core/channel/http_server_filter.h",
+ "src/core/channel/subchannel_call_holder.c",
+ "src/core/channel/subchannel_call_holder.h",
+ "src/core/client_config/client_config.c",
+ "src/core/client_config/client_config.h",
+ "src/core/client_config/connector.c",
+ "src/core/client_config/connector.h",
+ "src/core/client_config/default_initial_connect_string.c",
+ "src/core/client_config/initial_connect_string.c",
+ "src/core/client_config/initial_connect_string.h",
+ "src/core/client_config/lb_policies/pick_first.c",
+ "src/core/client_config/lb_policies/pick_first.h",
+ "src/core/client_config/lb_policies/round_robin.c",
+ "src/core/client_config/lb_policies/round_robin.h",
+ "src/core/client_config/lb_policy.c",
+ "src/core/client_config/lb_policy.h",
+ "src/core/client_config/lb_policy_factory.c",
+ "src/core/client_config/lb_policy_factory.h",
+ "src/core/client_config/lb_policy_registry.c",
+ "src/core/client_config/lb_policy_registry.h",
+ "src/core/client_config/resolver.c",
+ "src/core/client_config/resolver.h",
+ "src/core/client_config/resolver_factory.c",
+ "src/core/client_config/resolver_factory.h",
+ "src/core/client_config/resolver_registry.c",
+ "src/core/client_config/resolver_registry.h",
+ "src/core/client_config/resolvers/dns_resolver.c",
+ "src/core/client_config/resolvers/dns_resolver.h",
+ "src/core/client_config/resolvers/sockaddr_resolver.c",
+ "src/core/client_config/resolvers/sockaddr_resolver.h",
+ "src/core/client_config/subchannel.c",
+ "src/core/client_config/subchannel.h",
+ "src/core/client_config/subchannel_factory.c",
+ "src/core/client_config/subchannel_factory.h",
+ "src/core/client_config/uri_parser.c",
+ "src/core/client_config/uri_parser.h",
+ "src/core/compression/algorithm.c",
+ "src/core/compression/algorithm_metadata.h",
+ "src/core/compression/message_compress.c",
+ "src/core/compression/message_compress.h",
+ "src/core/debug/trace.c",
+ "src/core/debug/trace.h",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.c",
+ "src/core/httpcli/parser.h",
+ "src/core/iomgr/closure.c",
+ "src/core/iomgr/closure.h",
+ "src/core/iomgr/endpoint.c",
+ "src/core/iomgr/endpoint.h",
+ "src/core/iomgr/endpoint_pair.h",
+ "src/core/iomgr/endpoint_pair_posix.c",
+ "src/core/iomgr/endpoint_pair_windows.c",
+ "src/core/iomgr/exec_ctx.c",
+ "src/core/iomgr/exec_ctx.h",
+ "src/core/iomgr/executor.c",
+ "src/core/iomgr/executor.h",
+ "src/core/iomgr/fd_posix.c",
+ "src/core/iomgr/fd_posix.h",
+ "src/core/iomgr/iocp_windows.c",
+ "src/core/iomgr/iocp_windows.h",
+ "src/core/iomgr/iomgr.c",
+ "src/core/iomgr/iomgr.h",
+ "src/core/iomgr/iomgr_internal.h",
+ "src/core/iomgr/iomgr_posix.c",
+ "src/core/iomgr/iomgr_posix.h",
+ "src/core/iomgr/iomgr_windows.c",
+ "src/core/iomgr/pollset.h",
+ "src/core/iomgr/pollset_multipoller_with_epoll.c",
+ "src/core/iomgr/pollset_multipoller_with_poll_posix.c",
+ "src/core/iomgr/pollset_posix.c",
+ "src/core/iomgr/pollset_posix.h",
+ "src/core/iomgr/pollset_set.h",
+ "src/core/iomgr/pollset_set_posix.c",
+ "src/core/iomgr/pollset_set_posix.h",
+ "src/core/iomgr/pollset_set_windows.c",
+ "src/core/iomgr/pollset_set_windows.h",
+ "src/core/iomgr/pollset_windows.c",
+ "src/core/iomgr/pollset_windows.h",
+ "src/core/iomgr/resolve_address.h",
+ "src/core/iomgr/resolve_address_posix.c",
+ "src/core/iomgr/resolve_address_windows.c",
+ "src/core/iomgr/sockaddr.h",
+ "src/core/iomgr/sockaddr_posix.h",
+ "src/core/iomgr/sockaddr_utils.c",
+ "src/core/iomgr/sockaddr_utils.h",
+ "src/core/iomgr/sockaddr_win32.h",
+ "src/core/iomgr/socket_utils_common_posix.c",
+ "src/core/iomgr/socket_utils_linux.c",
+ "src/core/iomgr/socket_utils_posix.c",
+ "src/core/iomgr/socket_utils_posix.h",
+ "src/core/iomgr/socket_windows.c",
+ "src/core/iomgr/socket_windows.h",
+ "src/core/iomgr/tcp_client.h",
+ "src/core/iomgr/tcp_client_posix.c",
+ "src/core/iomgr/tcp_client_windows.c",
+ "src/core/iomgr/tcp_posix.c",
+ "src/core/iomgr/tcp_posix.h",
+ "src/core/iomgr/tcp_server.h",
+ "src/core/iomgr/tcp_server_posix.c",
+ "src/core/iomgr/tcp_server_windows.c",
+ "src/core/iomgr/tcp_windows.c",
+ "src/core/iomgr/tcp_windows.h",
+ "src/core/iomgr/time_averaged_stats.c",
+ "src/core/iomgr/time_averaged_stats.h",
+ "src/core/iomgr/timer.c",
+ "src/core/iomgr/timer.h",
+ "src/core/iomgr/timer_heap.c",
+ "src/core/iomgr/timer_heap.h",
+ "src/core/iomgr/timer_internal.h",
+ "src/core/iomgr/udp_server.c",
+ "src/core/iomgr/udp_server.h",
+ "src/core/iomgr/wakeup_fd_eventfd.c",
+ "src/core/iomgr/wakeup_fd_nospecial.c",
+ "src/core/iomgr/wakeup_fd_pipe.c",
+ "src/core/iomgr/wakeup_fd_pipe.h",
+ "src/core/iomgr/wakeup_fd_posix.c",
+ "src/core/iomgr/wakeup_fd_posix.h",
+ "src/core/iomgr/workqueue.h",
+ "src/core/iomgr/workqueue_posix.c",
+ "src/core/iomgr/workqueue_posix.h",
+ "src/core/iomgr/workqueue_windows.c",
+ "src/core/iomgr/workqueue_windows.h",
+ "src/core/json/json.c",
+ "src/core/json/json.h",
+ "src/core/json/json_common.h",
+ "src/core/json/json_reader.c",
+ "src/core/json/json_reader.h",
+ "src/core/json/json_string.c",
+ "src/core/json/json_writer.c",
+ "src/core/json/json_writer.h",
+ "src/core/profiling/basic_timers.c",
+ "src/core/profiling/stap_timers.c",
+ "src/core/profiling/timers.h",
+ "src/core/statistics/census_interface.h",
+ "src/core/statistics/census_rpc_stats.h",
+ "src/core/support/alloc.c",
+ "src/core/support/avl.c",
+ "src/core/support/block_annotate.h",
+ "src/core/support/cmdline.c",
+ "src/core/support/cpu_iphone.c",
+ "src/core/support/cpu_linux.c",
+ "src/core/support/cpu_posix.c",
+ "src/core/support/cpu_windows.c",
+ "src/core/support/env.h",
+ "src/core/support/env_linux.c",
+ "src/core/support/env_posix.c",
+ "src/core/support/env_win32.c",
+ "src/core/support/file.c",
+ "src/core/support/file.h",
+ "src/core/support/file_posix.c",
+ "src/core/support/file_win32.c",
+ "src/core/support/histogram.c",
+ "src/core/support/host_port.c",
+ "src/core/support/log.c",
+ "src/core/support/log_android.c",
+ "src/core/support/log_linux.c",
+ "src/core/support/log_posix.c",
+ "src/core/support/log_win32.c",
+ "src/core/support/murmur_hash.c",
+ "src/core/support/murmur_hash.h",
+ "src/core/support/slice.c",
+ "src/core/support/slice_buffer.c",
+ "src/core/support/stack_lockfree.c",
+ "src/core/support/stack_lockfree.h",
+ "src/core/support/string.c",
+ "src/core/support/string.h",
+ "src/core/support/string_posix.c",
+ "src/core/support/string_win32.c",
+ "src/core/support/string_win32.h",
+ "src/core/support/subprocess_posix.c",
+ "src/core/support/subprocess_windows.c",
+ "src/core/support/sync.c",
+ "src/core/support/sync_posix.c",
+ "src/core/support/sync_win32.c",
+ "src/core/support/thd.c",
+ "src/core/support/thd_internal.h",
+ "src/core/support/thd_posix.c",
+ "src/core/support/thd_win32.c",
+ "src/core/support/time.c",
+ "src/core/support/time_posix.c",
+ "src/core/support/time_precise.c",
+ "src/core/support/time_precise.h",
+ "src/core/support/time_win32.c",
+ "src/core/support/tls_pthread.c",
+ "src/core/support/wrap_memcpy.c",
+ "src/core/surface/alarm.c",
+ "src/core/surface/api_trace.c",
+ "src/core/surface/api_trace.h",
+ "src/core/surface/byte_buffer.c",
+ "src/core/surface/byte_buffer_reader.c",
+ "src/core/surface/call.c",
+ "src/core/surface/call.h",
+ "src/core/surface/call_details.c",
+ "src/core/surface/call_log_batch.c",
+ "src/core/surface/call_test_only.h",
+ "src/core/surface/channel.c",
+ "src/core/surface/channel.h",
+ "src/core/surface/channel_connectivity.c",
+ "src/core/surface/channel_create.c",
+ "src/core/surface/channel_ping.c",
+ "src/core/surface/completion_queue.c",
+ "src/core/surface/completion_queue.h",
+ "src/core/surface/event_string.c",
+ "src/core/surface/event_string.h",
+ "src/core/surface/init.c",
+ "src/core/surface/init.h",
+ "src/core/surface/init_unsecure.c",
+ "src/core/surface/lame_client.c",
+ "src/core/surface/metadata_array.c",
+ "src/core/surface/server.c",
+ "src/core/surface/server.h",
+ "src/core/surface/server_chttp2.c",
+ "src/core/surface/server_create.c",
+ "src/core/surface/surface_trace.h",
+ "src/core/surface/validate_metadata.c",
+ "src/core/surface/version.c",
+ "src/core/transport/byte_stream.c",
+ "src/core/transport/byte_stream.h",
+ "src/core/transport/chttp2/alpn.c",
+ "src/core/transport/chttp2/alpn.h",
+ "src/core/transport/chttp2/bin_encoder.c",
+ "src/core/transport/chttp2/bin_encoder.h",
+ "src/core/transport/chttp2/frame.h",
+ "src/core/transport/chttp2/frame_data.c",
+ "src/core/transport/chttp2/frame_data.h",
+ "src/core/transport/chttp2/frame_goaway.c",
+ "src/core/transport/chttp2/frame_goaway.h",
+ "src/core/transport/chttp2/frame_ping.c",
+ "src/core/transport/chttp2/frame_ping.h",
+ "src/core/transport/chttp2/frame_rst_stream.c",
+ "src/core/transport/chttp2/frame_rst_stream.h",
+ "src/core/transport/chttp2/frame_settings.c",
+ "src/core/transport/chttp2/frame_settings.h",
+ "src/core/transport/chttp2/frame_window_update.c",
+ "src/core/transport/chttp2/frame_window_update.h",
+ "src/core/transport/chttp2/hpack_encoder.c",
+ "src/core/transport/chttp2/hpack_encoder.h",
+ "src/core/transport/chttp2/hpack_parser.c",
+ "src/core/transport/chttp2/hpack_parser.h",
+ "src/core/transport/chttp2/hpack_table.c",
+ "src/core/transport/chttp2/hpack_table.h",
+ "src/core/transport/chttp2/http2_errors.h",
+ "src/core/transport/chttp2/huffsyms.c",
+ "src/core/transport/chttp2/huffsyms.h",
+ "src/core/transport/chttp2/incoming_metadata.c",
+ "src/core/transport/chttp2/incoming_metadata.h",
+ "src/core/transport/chttp2/internal.h",
+ "src/core/transport/chttp2/parsing.c",
+ "src/core/transport/chttp2/status_conversion.c",
+ "src/core/transport/chttp2/status_conversion.h",
+ "src/core/transport/chttp2/stream_lists.c",
+ "src/core/transport/chttp2/stream_map.c",
+ "src/core/transport/chttp2/stream_map.h",
+ "src/core/transport/chttp2/timeout_encoding.c",
+ "src/core/transport/chttp2/timeout_encoding.h",
+ "src/core/transport/chttp2/varint.c",
+ "src/core/transport/chttp2/varint.h",
+ "src/core/transport/chttp2/writing.c",
+ "src/core/transport/chttp2_transport.c",
+ "src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.c",
+ "src/core/transport/connectivity_state.h",
+ "src/core/transport/metadata.c",
+ "src/core/transport/metadata.h",
+ "src/core/transport/metadata_batch.c",
+ "src/core/transport/metadata_batch.h",
+ "src/core/transport/static_metadata.c",
+ "src/core/transport/static_metadata.h",
+ "src/core/transport/transport.c",
+ "src/core/transport/transport.h",
+ "src/core/transport/transport_impl.h",
+ "src/core/transport/transport_op_string.c",
+ ],
+ hdrs = [
+ "include/grpc/byte_buffer.h",
+ "include/grpc/byte_buffer_reader.h",
+ "include/grpc/census.h",
+ "include/grpc/compression.h",
+ "include/grpc/grpc.h",
+ "include/grpc/impl/codegen/alloc.h",
+ "include/grpc/impl/codegen/atm.h",
+ "include/grpc/impl/codegen/atm_gcc_atomic.h",
+ "include/grpc/impl/codegen/atm_gcc_sync.h",
+ "include/grpc/impl/codegen/atm_win32.h",
+ "include/grpc/impl/codegen/byte_buffer.h",
+ "include/grpc/impl/codegen/compression_types.h",
+ "include/grpc/impl/codegen/connectivity_state.h",
+ "include/grpc/impl/codegen/grpc_types.h",
+ "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/port_platform.h",
+ "include/grpc/impl/codegen/propagation_bits.h",
+ "include/grpc/impl/codegen/slice.h",
+ "include/grpc/impl/codegen/slice_buffer.h",
+ "include/grpc/impl/codegen/status.h",
+ "include/grpc/impl/codegen/sync.h",
+ "include/grpc/impl/codegen/sync_generic.h",
+ "include/grpc/impl/codegen/sync_posix.h",
+ "include/grpc/impl/codegen/sync_win32.h",
+ "include/grpc/impl/codegen/time.h",
+ "include/grpc/status.h",
+ "include/grpc/support/alloc.h",
+ "include/grpc/support/atm.h",
+ "include/grpc/support/atm_gcc_atomic.h",
+ "include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_win32.h",
+ "include/grpc/support/avl.h",
+ "include/grpc/support/cmdline.h",
+ "include/grpc/support/cpu.h",
+ "include/grpc/support/histogram.h",
+ "include/grpc/support/host_port.h",
+ "include/grpc/support/log.h",
+ "include/grpc/support/log_win32.h",
+ "include/grpc/support/port_platform.h",
+ "include/grpc/support/slice.h",
+ "include/grpc/support/slice_buffer.h",
+ "include/grpc/support/string_util.h",
+ "include/grpc/support/subprocess.h",
+ "include/grpc/support/sync.h",
+ "include/grpc/support/sync_generic.h",
+ "include/grpc/support/sync_posix.h",
+ "include/grpc/support/sync_win32.h",
+ "include/grpc/support/thd.h",
+ "include/grpc/support/time.h",
+ "include/grpc/support/tls.h",
+ "include/grpc/support/tls_gcc.h",
+ "include/grpc/support/tls_msvc.h",
+ "include/grpc/support/tls_pthread.h",
+ "include/grpc/support/useful.h",
+ ],
+ copts = [
+ "-std=gnu99",
+ "-Wno-implicit-function-declaration",
+ ],
+ includes = [
+ ".",
+ "include",
+ ],
+ deps = [
+ "//third_party/zlib",
+ ],
+)
+
+cc_library(
+ name = "grpc++_unsecure",
+ srcs = [
+ "src/cpp/client/channel.cc",
+ "src/cpp/client/client_context.cc",
+ "src/cpp/client/create_channel.cc",
+ "src/cpp/client/create_channel_internal.cc",
+ "src/cpp/client/create_channel_internal.h",
+ "src/cpp/client/credentials.cc",
+ "src/cpp/client/generic_stub.cc",
+ "src/cpp/client/insecure_credentials.cc",
+ "src/cpp/codegen/grpc_library.cc",
+ "src/cpp/common/call.cc",
+ "src/cpp/common/channel_arguments.cc",
+ "src/cpp/common/completion_queue.cc",
+ "src/cpp/common/create_auth_context.h",
+ "src/cpp/common/insecure_create_auth_context.cc",
+ "src/cpp/common/rpc_method.cc",
+ "src/cpp/proto/proto_utils.cc",
+ "src/cpp/server/async_generic_service.cc",
+ "src/cpp/server/create_default_thread_pool.cc",
+ "src/cpp/server/dynamic_thread_pool.cc",
+ "src/cpp/server/dynamic_thread_pool.h",
+ "src/cpp/server/fixed_size_thread_pool.cc",
+ "src/cpp/server/fixed_size_thread_pool.h",
+ "src/cpp/server/insecure_server_credentials.cc",
+ "src/cpp/server/server.cc",
+ "src/cpp/server/server_builder.cc",
+ "src/cpp/server/server_context.cc",
+ "src/cpp/server/server_credentials.cc",
+ "src/cpp/server/thread_pool_interface.h",
+ "src/cpp/util/byte_buffer.cc",
+ "src/cpp/util/slice.cc",
+ "src/cpp/util/status.cc",
+ "src/cpp/util/string_ref.cc",
+ "src/cpp/util/time.cc",
+ ],
+ hdrs = [
+ "include/grpc++/channel.h",
+ "include/grpc++/client_context.h",
+ "include/grpc++/completion_queue.h",
+ "include/grpc++/create_channel.h",
+ "include/grpc++/generic/async_generic_service.h",
+ "include/grpc++/generic/generic_stub.h",
+ "include/grpc++/grpc++.h",
+ "include/grpc++/impl/call.h",
+ "include/grpc++/impl/client_unary_call.h",
+ "include/grpc++/impl/codegen/async_stream.h",
+ "include/grpc++/impl/codegen/async_unary_call.h",
+ "include/grpc++/impl/codegen/call.h",
+ "include/grpc++/impl/codegen/call_hook.h",
+ "include/grpc++/impl/codegen/channel_interface.h",
+ "include/grpc++/impl/codegen/client_context.h",
+ "include/grpc++/impl/codegen/client_unary_call.h",
+ "include/grpc++/impl/codegen/completion_queue.h",
+ "include/grpc++/impl/codegen/completion_queue_tag.h",
+ "include/grpc++/impl/codegen/config.h",
+ "include/grpc++/impl/codegen/config_protobuf.h",
+ "include/grpc++/impl/codegen/grpc_library.h",
+ "include/grpc++/impl/codegen/method_handler_impl.h",
+ "include/grpc++/impl/codegen/proto_utils.h",
+ "include/grpc++/impl/codegen/rpc_method.h",
+ "include/grpc++/impl/codegen/rpc_service_method.h",
+ "include/grpc++/impl/codegen/security/auth_context.h",
+ "include/grpc++/impl/codegen/serialization_traits.h",
+ "include/grpc++/impl/codegen/server_context.h",
+ "include/grpc++/impl/codegen/server_interface.h",
+ "include/grpc++/impl/codegen/service_type.h",
+ "include/grpc++/impl/codegen/status.h",
+ "include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/string_ref.h",
+ "include/grpc++/impl/codegen/stub_options.h",
+ "include/grpc++/impl/codegen/sync.h",
+ "include/grpc++/impl/codegen/sync_cxx11.h",
+ "include/grpc++/impl/codegen/sync_no_cxx11.h",
+ "include/grpc++/impl/codegen/sync_stream.h",
+ "include/grpc++/impl/codegen/time.h",
+ "include/grpc++/impl/grpc_library.h",
+ "include/grpc++/impl/method_handler_impl.h",
+ "include/grpc++/impl/proto_utils.h",
+ "include/grpc++/impl/rpc_method.h",
+ "include/grpc++/impl/rpc_service_method.h",
+ "include/grpc++/impl/serialization_traits.h",
+ "include/grpc++/impl/server_builder_option.h",
+ "include/grpc++/impl/service_type.h",
+ "include/grpc++/impl/sync.h",
+ "include/grpc++/impl/sync_cxx11.h",
+ "include/grpc++/impl/sync_no_cxx11.h",
+ "include/grpc++/impl/thd.h",
+ "include/grpc++/impl/thd_cxx11.h",
+ "include/grpc++/impl/thd_no_cxx11.h",
+ "include/grpc++/security/auth_context.h",
+ "include/grpc++/security/auth_metadata_processor.h",
+ "include/grpc++/security/credentials.h",
+ "include/grpc++/security/server_credentials.h",
+ "include/grpc++/server.h",
+ "include/grpc++/server_builder.h",
+ "include/grpc++/server_context.h",
+ "include/grpc++/support/async_stream.h",
+ "include/grpc++/support/async_unary_call.h",
+ "include/grpc++/support/byte_buffer.h",
+ "include/grpc++/support/channel_arguments.h",
+ "include/grpc++/support/config.h",
+ "include/grpc++/support/config_protobuf.h",
+ "include/grpc++/support/slice.h",
+ "include/grpc++/support/status.h",
+ "include/grpc++/support/status_code_enum.h",
+ "include/grpc++/support/string_ref.h",
+ "include/grpc++/support/stub_options.h",
+ "include/grpc++/support/sync_stream.h",
+ "include/grpc++/support/time.h",
+ ],
+ deps = [
+ ":grpc_unsecure",
+ "//third_party/protobuf:protobuf_clib",
+ ],
+)
diff --git a/third_party/grpc/README.bazel.md b/third_party/grpc/README.bazel.md
new file mode 100644
index 0000000000..750f157051
--- /dev/null
+++ b/third_party/grpc/README.bazel.md
@@ -0,0 +1,22 @@
+How to update the C++ sources of gRPC:
+
+1. `git clone http://github.com/grpc/grpc.git` in a convenient directory
+2. `git checkout <tag>` (current is `release-0_13`, commithash `78e04bbd`)
+3. `mkdir -p third_party/grpc/src`
+4. `cp -R <gRPC git tree>/src/{compiler,core-cpp} third_party/grpc/src`
+5. `cp -R <gRPC git tree>/include third_party/grpc`
+6. Update BUILD files by copying the rules from the BUILD file of gRPC
+7. Patch in grpc.patch. It makes gRPC work under msys2.
+
+
+How to update the Java plugin:
+
+1. Take version `0.15.0` from https://github.com/grpc/grpc-java
+ commit hash is `b7d816fb3d0d38e`
+2. `cp -R <grpg-java git tree>/compiler/src/java_plugin third_party/grpc-java/compiler/src`
+
+How to update the Java code:
+
+Download it from Maven central. The jars are called `grpc-core`, `grpc-netty`,
+`grpc-protobuf`, `grpc-protobuf-lite`, `grpc-stub` and the version is
+`0.15.0`.
diff --git a/third_party/ijar/BUILD b/third_party/ijar/BUILD
new file mode 100644
index 0000000000..41376208aa
--- /dev/null
+++ b/third_party/ijar/BUILD
@@ -0,0 +1,77 @@
+package(
+ default_visibility = [
+ "//src:__subpackages__",
+ "//third_party/ijar:__subpackages__",
+ ],
+)
+
+licenses(["notice"]) # Apache 2.0
+
+cc_library(
+ name = "zip",
+ srcs = [
+ "zip.cc",
+ ] + select({
+ "//src:windows": [
+ "mapped_file_windows.cc",
+ ],
+ "//src:windows_msvc": [
+ "mapped_file_windows.cc",
+ ],
+ "//conditions:default": [
+ "mapped_file_unix.cc",
+ ],
+ }),
+ hdrs = [
+ "common.h",
+ "mapped_file.h",
+ "zip.h",
+ ],
+ deps = [
+ ":platform_utils",
+ ":zlib_client",
+ ],
+)
+
+cc_library(
+ name = "zlib_client",
+ srcs = ["zlib_client.cc"],
+ hdrs = [
+ "common.h",
+ "zlib_client.h",
+ ],
+ deps = ["//third_party/zlib"],
+)
+
+cc_library(
+ name = "platform_utils",
+ srcs = ["platform_utils.cc"],
+ hdrs = [
+ "common.h",
+ "platform_utils.h",
+ ],
+ visibility = ["//visibility:private"],
+)
+
+cc_binary(
+ name = "zipper",
+ srcs = ["zip_main.cc"],
+ visibility = ["//visibility:public"],
+ deps = [":zip"],
+)
+
+cc_binary(
+ name = "ijar",
+ srcs = [
+ "classfile.cc",
+ "ijar.cc",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [":zip"],
+)
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]) + ["//third_party/ijar/test:srcs"],
+ visibility = ["//third_party:__pkg__"],
+)
diff --git a/third_party/ijar/test/BUILD b/third_party/ijar/test/BUILD
new file mode 100644
index 0000000000..2687888c52
--- /dev/null
+++ b/third_party/ijar/test/BUILD
@@ -0,0 +1,211 @@
+package(default_visibility = ["//visibility:__pkg__"])
+
+licenses(["notice"]) # Apache License 2.0
+
+exports_files(["LICENSE"])
+
+sh_test(
+ name = "ijar_test",
+ size = "enormous",
+ srcs = ["ijar_test.sh"],
+ args = [
+ "../local_jdk/bin/javac",
+ "../local_jdk/bin/java",
+ "../local_jdk/bin/jar",
+ "../local_jdk/bin/javap",
+ "$(location //third_party/ijar)",
+ "$(location //tools/jdk:langtools)",
+ # We assume unzip and zip to be on the path
+ "unzip",
+ "zip",
+ "$(location :zip_count)",
+ ],
+ data = [
+ "testenv.sh",
+ "//src/test/shell:bashunit",
+ "//third_party/ijar",
+ "A.java",
+ "B.java",
+ "Object.java",
+ "WellCompressed1.java",
+ "WellCompressed2.java",
+ ":libtypeannotations2.jar",
+ ":libmethodparameters.jar",
+ ":source_debug_extension.jar",
+ ":largest_regular.jar",
+ ":smallest_zip64.jar",
+ ":definitely_zip64.jar",
+ ":zip_count",
+ "TypeAnnotationTest2.java",
+ ":libinvokedynamic.jar",
+ # Intentionally bad test JAR: file count in central directory
+ # wrong.
+ "libwrongcentraldir.jar",
+ "//tools/defaults:jdk",
+ "//tools/jdk:langtools",
+ ],
+ shard_count = 5,
+ tags = [
+ "jdk8",
+ "zip",
+ ],
+)
+
+sh_test(
+ name = "zip_test",
+ size = "large",
+ srcs = ["zip_test.sh"],
+ args = [
+ "$(location //third_party/ijar:zipper)",
+ # We assume unzip and zip to be on the path
+ "unzip",
+ "zip",
+ ],
+ data = [
+ "testenv.sh",
+ "//src/test/shell:bashunit",
+ "//third_party/ijar:zipper",
+ ],
+ tags = ["zip"],
+)
+
+java_library(
+ name = "invokedynamic",
+ testonly = 1,
+ srcs = ["invokedynamic/ClassWithLambda.java"],
+ tags = ["jdk8"],
+)
+
+# For testing purposes: a class which exposes a private nested class in
+# public API, classes with annotations and a class with different forms of
+# deprecations markers
+java_library(
+ name = "ijar_testlib",
+ srcs = [
+ "AnnotatedClass.java",
+ "Annotations.java",
+ "DeprecatedParts.java",
+ "DumbClass.java",
+ "EnclosingMethod.java",
+ "PrivateMembersClass.java",
+ ],
+)
+
+# For testing purposes: an interface jar (ijar) which includes the
+# interface view of the various test class from above.
+genrule(
+ name = "interface_ijar_testlib",
+ srcs = [":ijar_testlib"],
+ outs = ["interface_ijar_testlib.jar"],
+ cmd = "$(location //third_party/ijar) $< $@",
+ tools = ["//third_party/ijar"],
+)
+
+java_library(
+ name = "typeannotations2",
+ srcs = glob(["typeannotations2/**/*.java"]),
+ tags = ["jdk8"],
+)
+
+java_library(
+ name = "methodparameters",
+ srcs = ["methodparameters/Test.java"],
+ javacopts = ["-parameters"],
+ tags = ["jdk8"],
+)
+
+java_binary(
+ name = "gen_source_debug_extension",
+ srcs = ["GenSourceDebugExtension.java"],
+ main_class = "test.GenSourceDebugExtension",
+ deps = ["//third_party:asm"],
+)
+
+genrule(
+ name = "gen_source_debug_extension_jar",
+ srcs = [],
+ outs = ["source_debug_extension.jar"],
+ cmd = "$(location :gen_source_debug_extension) $@",
+ tools = ["gen_source_debug_extension"],
+)
+
+java_library(
+ name = "local_and_anonymous_lib",
+ srcs = ["LocalAndAnonymous.java"],
+)
+
+genrule(
+ name = "local_and_anonymous_interface",
+ srcs = [":liblocal_and_anonymous_lib.jar"],
+ outs = ["local_and_anonymous-interface.jar"],
+ cmd = "$(location //third_party/ijar) $< $@",
+ tools = ["//third_party/ijar"],
+)
+
+java_test(
+ name = "IjarTests",
+ size = "small",
+ srcs = [
+ "IjarTests.java",
+ "StripVerifyingVisitor.java",
+ ],
+ data = [
+ "PrivateNestedClass.java",
+ "UseDeprecatedParts.java",
+ "UseRestrictedAnnotation.java",
+ "package-info.java",
+ ":interface_ijar_testlib",
+ ":liblocal_and_anonymous_lib.jar",
+ ":local_and_anonymous-interface.jar",
+ ],
+ tags = ["zip"],
+ test_class = "IjarTests",
+ deps = [
+ "//src/java_tools/buildjar:BazelJavaCompiler",
+ "//third_party:asm",
+ "//third_party:guava",
+ "//third_party:junit4",
+ "//third_party:truth",
+ ],
+)
+
+test_suite(
+ name = "all_tests",
+ testonly = 1,
+ visibility = ["//visibility:public"],
+)
+
+java_binary(
+ name = "gen_zip_with_entries",
+ srcs = ["GenZipWithEntries.java"],
+ jvm_flags = ["-Djdk.util.zip.inhibitZip64=false"],
+ main_class = "test.GenZipWithEntries",
+ deps = ["//third_party:asm"],
+)
+
+[
+ genrule(
+ name = name,
+ outs = [name + ".jar"],
+ cmd = "$(location :gen_zip_with_entries) %s $@" % entries,
+ tools = [":gen_zip_with_entries"],
+ )
+ for name, entries in [
+ ("largest_regular", 65535),
+ ("smallest_zip64", 65536),
+ ("definitely_zip64", 70000),
+ ]
+]
+
+java_binary(
+ name = "zip_count",
+ srcs = ["ZipCount.java"],
+ jvm_flags = ["-Djdk.util.zip.inhibitZip64=false"],
+ main_class = "test.ZipCount",
+)
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party/ijar:__pkg__"],
+)
diff --git a/third_party/ijar/test/testenv.sh b/third_party/ijar/test/testenv.sh
new file mode 100755
index 0000000000..235f2c5948
--- /dev/null
+++ b/third_party/ijar/test/testenv.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright 2015 The Bazel Authors. All rights reserved.
+#
+# 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.
+#
+# Setting up the environment for Bazel integration tests.
+#
+
+[ -z "$TEST_SRCDIR" ] && { echo "TEST_SRCDIR not set!" >&2; exit 1; }
+
+# Load the unit-testing framework
+source "${TEST_SRCDIR}/io_bazel/src/test/shell/unittest.bash" || \
+ { echo "Failed to source unittest.bash" >&2; exit 1; }
+
+## OSX/BSD stat and MD5
+PLATFORM="$(uname -s | tr 'A-Z' 'a-z')"
+if [[ "$PLATFORM" = "linux" ]]; then
+ function statfmt() {
+ stat -c "%s" $1
+ }
+ MD5SUM=md5sum
+else
+ function statfmt() {
+ stat -f "%z" $1
+ }
+ MD5SUM=/sbin/md5
+fi
diff --git a/third_party/iossim/BUILD b/third_party/iossim/BUILD
new file mode 100644
index 0000000000..f070cac910
--- /dev/null
+++ b/third_party/iossim/BUILD
@@ -0,0 +1,12 @@
+licenses(["notice"]) # 3-clause BSD
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = [
+ "//src:__pkg__",
+ "//third_party:__pkg__",
+ ],
+)
+
+exports_files(["iossim"])
diff --git a/third_party/java/android_databinding/BUILD b/third_party/java/android_databinding/BUILD
new file mode 100644
index 0000000000..9d66f2123d
--- /dev/null
+++ b/third_party/java/android_databinding/BUILD
@@ -0,0 +1,32 @@
+# Copyright 2016 The Bazel Authors. All rights reserved.
+#
+# 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.
+
+licenses(["notice"]) # Apache License 2.0
+
+exports_files(["LICENSE"])
+
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+# Executable for the databinding resource compiler.
+java_import(
+ name = "exec",
+ jars = ["exec.jar"],
+)
diff --git a/third_party/java/aosp_gradle_core/BUILD b/third_party/java/aosp_gradle_core/BUILD
new file mode 100644
index 0000000000..7df881c1a9
--- /dev/null
+++ b/third_party/java/aosp_gradle_core/BUILD
@@ -0,0 +1,20 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+filegroup(name = "embedded_aosp_gradle_core")
+
+java_library(
+ name = "aosp_gradle_core",
+ srcs = glob(["java/**/*.java"]),
+ deps = [
+ "//third_party:android_common_25_0_0",
+ "//third_party:asm",
+ "//third_party:guava",
+ ],
+)
diff --git a/third_party/java/apkbuilder/BUILD b/third_party/java/apkbuilder/BUILD
new file mode 100644
index 0000000000..3274a12150
--- /dev/null
+++ b/third_party/java/apkbuilder/BUILD
@@ -0,0 +1,32 @@
+licenses(["notice"]) # Apache 2.0
+
+filegroup(
+ name = "embedded_tools",
+ srcs = [
+ "BUILD.tools",
+ "apkbuilder_deploy.jar",
+ ],
+ visibility = ["//src:__pkg__"],
+)
+
+# This filegroup is necessary so that Bazel finds an apkbuilder during the
+# bootstrap process when this file is used as
+# @bazel_tools//third_party/java/apkbuilder/BUILD. Otherwise, the bootstrap
+# would fail if an Android SDK was declared in the WORKSPACE file of Bazel.
+filegroup(name = "embedded_apkbuilder")
+
+java_binary(
+ name = "apkbuilder",
+ srcs = glob(["java/**/*.java"]),
+ main_class = "com.android.sdklib.build.ApkBuilderMain",
+ deps = [
+ "//src/java_tools/singlejar:libSingleJar",
+ "//third_party:guava",
+ ],
+)
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
diff --git a/third_party/java/apkbuilder/BUILD.tools b/third_party/java/apkbuilder/BUILD.tools
new file mode 100644
index 0000000000..580ada40d2
--- /dev/null
+++ b/third_party/java/apkbuilder/BUILD.tools
@@ -0,0 +1,15 @@
+# The build file for apkbuilder when it's in bazel's embedded tools repo.
+
+licenses(["notice"]) # Apache 2.0
+
+java_binary(
+ name = "embedded_apkbuilder",
+ main_class = "com.android.sdklib.build.ApkBuilderMain",
+ runtime_deps = [":apkbuilder_deploy_jar"],
+ visibility = ["//visibility:public"],
+)
+
+java_import(
+ name = "apkbuilder_deploy_jar",
+ jars = [":apkbuilder_deploy.jar"]
+)
diff --git a/third_party/java/buck-ios-support/BUILD b/third_party/java/buck-ios-support/BUILD
new file mode 100644
index 0000000000..fd84b25b2d
--- /dev/null
+++ b/third_party/java/buck-ios-support/BUILD
@@ -0,0 +1,21 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+java_library(
+ name = "buck-ios-support",
+ srcs = glob(
+ ["java/**/*.java"],
+ ),
+ deps = [
+ "//third_party:guava",
+ "//third_party:jsr305",
+ "//third_party/java/dd_plist",
+ ],
+)
diff --git a/third_party/java/dd_plist/BUILD b/third_party/java/dd_plist/BUILD
new file mode 100644
index 0000000000..ec497c30a0
--- /dev/null
+++ b/third_party/java/dd_plist/BUILD
@@ -0,0 +1,14 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # MIT
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+java_library(
+ name = "dd_plist",
+ srcs = glob(["java/**/*.java"]),
+)
diff --git a/third_party/java/j2objc/BUILD b/third_party/java/j2objc/BUILD
new file mode 100644
index 0000000000..bb1cd5c565
--- /dev/null
+++ b/third_party/java/j2objc/BUILD
@@ -0,0 +1,51 @@
+# Copyright 2015 The Bazel Authors. All rights reserved.
+#
+# 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.
+
+licenses(["notice"]) # Apache License 2.0
+
+exports_files(["LICENSE"])
+
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+java_library(
+ name = "annotations",
+ exports = ["@bazel_j2objc//:annotations"],
+)
+
+genrule(
+ name = "jre_emul_jar",
+ srcs = ["@bazel_j2objc//:jre_emul.jar"],
+ outs = ["jre_emul.jar"],
+ cmd = "cp $< $@",
+)
+
+objc_library(
+ name = "jre_emul_lib",
+ sdk_dylibs = [
+ "libicucore",
+ "libz",
+ ],
+ sdk_frameworks = [
+ "Security",
+ ],
+ deps = ["@bazel_j2objc//:jre_emul_archive"],
+)
diff --git a/third_party/java/j2objc/BUILD.remote b/third_party/java/j2objc/BUILD.remote
new file mode 100644
index 0000000000..44daaf8a3e
--- /dev/null
+++ b/third_party/java/j2objc/BUILD.remote
@@ -0,0 +1,54 @@
+# Copyright 2015 The Bazel Authors. All rights reserved.
+#
+# 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.
+
+licenses(["notice"]) # Apache License 2.0
+
+exports_files(["LICENSE"])
+
+J2_DIR = "j2objc-1.0.1/"
+
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+genrule(
+ name = "jre_emul_jar",
+ srcs = [J2_DIR + "lib/jre_emul.jar"],
+ outs = ["jre_emul.jar"],
+ cmd = "cp $< $@",
+)
+
+java_import(
+ name = "annotations",
+ jars = [J2_DIR + "lib/j2objc_annotations.jar"],
+)
+
+java_import(
+ name = "j2objc",
+ jars = [J2_DIR + "lib/j2objc.jar"],
+ exports = [":annotations"],
+)
+
+filegroup(
+ name = "jre_emul_headers",
+ #srcs = glob([J2_DIR + "include/IOSClass.h"]),
+ srcs = [J2_DIR + "include/IOSClass.h"],
+)
+
+objc_import(
+ name = "jre_emul_archive",
+ hdrs = glob([J2_DIR + "include/**"]),
+ includes = [J2_DIR + "include"],
+ archives = [J2_DIR + "lib/libjre_emul.a"],
+)
diff --git a/third_party/java/jarjar/BUILD b/third_party/java/jarjar/BUILD
new file mode 100644
index 0000000000..8f31f169c6
--- /dev/null
+++ b/third_party/java/jarjar/BUILD
@@ -0,0 +1,19 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+java_import(
+ name = "jarjar",
+ jars = ["jarjar-1.4.jar"],
+)
+
+java_binary(
+ name = "jarjar_bin",
+ main_class = "com.tonicsystems.jarjar.Main",
+ runtime_deps = [":jarjar"],
+)
diff --git a/third_party/java/jdk/README.md b/third_party/java/jdk/README.md
new file mode 100644
index 0000000000..96881e66b8
--- /dev/null
+++ b/third_party/java/jdk/README.md
@@ -0,0 +1,23 @@
+# Java compilers in Bazel
+
+Bazel compiles Java code using a custom builder. This builder is called
+JavaBuilder and its code lies in //src/java_tools/buildjar. To build Java
+code, JavaBuilder use the Java compiler from the JDK. To support
+[ErrorProne](http://errorprone.info) checks, we vendor a custom build
+of the Java compiler code. This is the raw version of the Java compiler
+from [OpenJDK](https://openjdk.java.net) but compiled for a lower
+version of the JRE. Those builds are vendored in
+//third_party/java/jdk/langtools.
+
+Currently Bazel supports running on a JRE 8 only because the default Java
+compiler used (//third_party/java/jdk/langtools/javac-9-dev-r3297-1.jar) is the
+Java compiler of OpenJDK 9 compiled to run on a JRE 8. This cannot
+be built to run on a JRE 7 because of code incompatibility. Bazel's
+JavaBuilder at HEAD cannot be linked with earlier version of the
+Java compiler (it depends on some internals of the Java compiler).
+
+To build a version of Bazel that can run on a JRE 7, we need to rely
+on the version of JavaBuilder provided with Bazel 0.1.0
+(//third_party/java/jdk/javabuilder/JavaBuilder_0.1.0_deploy.jar) which works
+with a Java compiler of OpenJDK 8 compiled to run on a JRE 7
+(//third_party/java/jdk/langtools/javac7.jar).
diff --git a/third_party/java/jdk/javabuilder/BUILD b/third_party/java/jdk/javabuilder/BUILD
new file mode 100644
index 0000000000..f670c45bcd
--- /dev/null
+++ b/third_party/java/jdk/javabuilder/BUILD
@@ -0,0 +1,13 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0 license
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+filegroup(
+ name = "JavaBuilder_0.1.0",
+ srcs = ["JavaBuilder_0.1.0_deploy.jar"],
+)
diff --git a/third_party/java/jdk/langtools/BUILD b/third_party/java/jdk/langtools/BUILD
new file mode 100644
index 0000000000..b529d2a45d
--- /dev/null
+++ b/third_party/java/jdk/langtools/BUILD
@@ -0,0 +1,49 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["restricted"]) # GNU GPL v2 with Classpath exception
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+filegroup(
+ name = "test-srcs",
+ srcs = select({
+ "//tools/jdk:jdk7": [
+ "BUILD",
+ "LICENSE",
+ "javac7.jar",
+ "javac7.srcjar",
+ ],
+ "//conditions:default": [
+ "BUILD",
+ "LICENSE",
+ "javac-9-dev-r3297-1.jar",
+ "javac-9-dev-r3297-1.srcjar",
+ ],
+ }),
+)
+
+java_import(
+ name = "javac",
+ jars = ["javac-9-dev-r3297-1.jar"],
+)
+
+filegroup(
+ name = "javac_jar",
+ srcs = select({
+ "//tools/jdk:jdk7": ["javac7.jar"],
+ "//conditions:default": ["javac-9-dev-r3297-1.jar"],
+ }),
+)
+
+java_import(
+ name = "javac7",
+ jars = ["javac7.jar"],
+)
+
+filegroup(
+ name = "javac7_jar",
+ srcs = ["javac7.jar"],
+)
diff --git a/third_party/javascript/bootstrap/BUILD b/third_party/javascript/bootstrap/BUILD
new file mode 100644
index 0000000000..3b2f7811f5
--- /dev/null
+++ b/third_party/javascript/bootstrap/BUILD
@@ -0,0 +1,16 @@
+licenses(["notice"]) # MIT
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+filegroup(
+ name = "bootstrap_js",
+ srcs = [
+ "js/bootstrap.js",
+ "js/bootstrap.min.js",
+ ],
+ visibility = ["//site:__pkg__"],
+)
diff --git a/third_party/javascript/bootstrap/README.md b/third_party/javascript/bootstrap/README.md
new file mode 100644
index 0000000000..d7aae57b44
--- /dev/null
+++ b/third_party/javascript/bootstrap/README.md
@@ -0,0 +1,4 @@
+## [Bootstrap](https://github.com/twbs/bootstrap)
+
+* Version: 3.3.6
+* License: MIT
diff --git a/third_party/jformatstring/BUILD b/third_party/jformatstring/BUILD
new file mode 100644
index 0000000000..f3f1d35b94
--- /dev/null
+++ b/third_party/jformatstring/BUILD
@@ -0,0 +1,20 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["restricted"]) # GNU GPL v2 with Classpath exception
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+java_library(
+ name = "jformatstring",
+ srcs = glob(["java/**"]),
+)
+
+load("//tools/build_rules:java_rules_skylark.bzl", "bootstrap_java_library")
+
+bootstrap_java_library(
+ name = "bootstrap",
+ srcs = glob(["java/**"]),
+)
diff --git a/third_party/nanopb/BUILD b/third_party/nanopb/BUILD
new file mode 100644
index 0000000000..e0d16b6049
--- /dev/null
+++ b/third_party/nanopb/BUILD
@@ -0,0 +1,15 @@
+licenses(["unencumbered"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+cc_library(
+ name = "nanopb",
+ srcs = glob(["*.c"]),
+ hdrs = glob(["*.h"]),
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/protobuf/3.0.0/BUILD b/third_party/protobuf/3.0.0/BUILD
new file mode 100644
index 0000000000..5260df61c3
--- /dev/null
+++ b/third_party/protobuf/3.0.0/BUILD
@@ -0,0 +1,316 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load("//third_party/protobuf/3.0.0:protobuf.bzl", "py_proto_library")
+
+filegroup(
+ name = "srcs",
+ srcs = glob(
+ [
+ "**",
+ "protobuf.bzl",
+ "python/google/protobuf/**/*.py",
+ "src/google/protobuf/**/*.proto",
+ ],
+ ),
+ visibility = ["//third_party/protobuf:__pkg__"],
+)
+
+java_import(
+ name = "protobuf",
+ jars = ["protobuf-java-3.0.0.jar"],
+)
+
+# For bootstrapping JavaBuilder
+filegroup(
+ name = "protobuf-jars",
+ srcs = ["protobuf-java-3.0.0.jar"],
+)
+
+################################################################################
+# The following rules are based on the build rules in protobuf's BUILD files.
+################################################################################
+
+py_library(
+ name = "protobuf_python_srcs",
+ srcs = glob(
+ [
+ "python/google/protobuf/*.py",
+ "python/google/protobuf/**/*.py",
+ ],
+ exclude = [
+ "python/google/protobuf/__init__.py",
+ "python/google/protobuf/**/__init__.py",
+ "python/google/protobuf/internal/*_test.py",
+ "python/google/protobuf/internal/test_util.py",
+ ],
+ ),
+ imports = ["python"],
+ srcs_version = "PY2AND3",
+)
+
+py_proto_library(
+ name = "protobuf_python",
+ srcs = [
+ "src/google/protobuf/any.proto",
+ "src/google/protobuf/api.proto",
+ "src/google/protobuf/compiler/plugin.proto",
+ "src/google/protobuf/descriptor.proto",
+ "src/google/protobuf/duration.proto",
+ "src/google/protobuf/empty.proto",
+ "src/google/protobuf/field_mask.proto",
+ "src/google/protobuf/source_context.proto",
+ "src/google/protobuf/struct.proto",
+ "src/google/protobuf/timestamp.proto",
+ "src/google/protobuf/type.proto",
+ "src/google/protobuf/wrappers.proto",
+ ],
+ include = "src",
+ default_runtime = "",
+ protoc = ":protoc",
+ py_libs = [
+ ":protobuf_python_srcs",
+ "//third_party/py/six",
+ ],
+ srcs_version = "PY2AND3",
+)
+
+COPTS = [
+ "-DHAVE_PTHREAD",
+ "-Wall",
+ "-Wwrite-strings",
+ "-Woverloaded-virtual",
+ "-Wno-sign-compare",
+ "-Wno-error=unused-function",
+ "-Wno-error=unused-variable",
+]
+
+LINK_OPTS = select({
+ "//src:freebsd": [
+ "-lpthread",
+ "-lm",
+ ],
+ "//conditions:default": ["-lpthread"],
+})
+
+cc_library(
+ name = "protobuf_lite",
+ srcs = [
+ # AUTOGEN(protobuf_lite_srcs)
+ "src/google/protobuf/arena.cc",
+ "src/google/protobuf/arenastring.cc",
+ "src/google/protobuf/extension_set.cc",
+ "src/google/protobuf/generated_message_util.cc",
+ "src/google/protobuf/io/coded_stream.cc",
+ "src/google/protobuf/io/zero_copy_stream.cc",
+ "src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
+ "src/google/protobuf/message_lite.cc",
+ "src/google/protobuf/repeated_field.cc",
+ "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
+ "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
+ "src/google/protobuf/stubs/bytestream.cc",
+ "src/google/protobuf/stubs/common.cc",
+ "src/google/protobuf/stubs/int128.cc",
+ "src/google/protobuf/stubs/once.cc",
+ "src/google/protobuf/stubs/status.cc",
+ "src/google/protobuf/stubs/statusor.cc",
+ "src/google/protobuf/stubs/stringpiece.cc",
+ "src/google/protobuf/stubs/stringprintf.cc",
+ "src/google/protobuf/stubs/structurally_valid.cc",
+ "src/google/protobuf/stubs/strutil.cc",
+ "src/google/protobuf/stubs/time.cc",
+ "src/google/protobuf/wire_format_lite.cc",
+ ],
+ hdrs = glob(["src/google/protobuf/**/*.h"]),
+ copts = COPTS,
+ includes = ["src/"],
+ linkopts = LINK_OPTS,
+ visibility = ["//visibility:public"],
+)
+
+# This is named just "protobuf" in protobuf's BUILD file, but it is renamed here
+# to "protobuf_clib" to avoid conflicting with the java_import named "protobuf"
+# above.
+cc_library(
+ name = "protobuf_clib",
+ srcs = [
+ # AUTOGEN(protobuf_srcs)
+ "src/google/protobuf/any.cc",
+ "src/google/protobuf/any.pb.cc",
+ "src/google/protobuf/api.pb.cc",
+ "src/google/protobuf/compiler/importer.cc",
+ "src/google/protobuf/compiler/parser.cc",
+ "src/google/protobuf/descriptor.cc",
+ "src/google/protobuf/descriptor.pb.cc",
+ "src/google/protobuf/descriptor_database.cc",
+ "src/google/protobuf/duration.pb.cc",
+ "src/google/protobuf/dynamic_message.cc",
+ "src/google/protobuf/empty.pb.cc",
+ "src/google/protobuf/extension_set_heavy.cc",
+ "src/google/protobuf/field_mask.pb.cc",
+ "src/google/protobuf/generated_message_reflection.cc",
+ "src/google/protobuf/io/gzip_stream.cc",
+ "src/google/protobuf/io/printer.cc",
+ "src/google/protobuf/io/strtod.cc",
+ "src/google/protobuf/io/tokenizer.cc",
+ "src/google/protobuf/io/zero_copy_stream_impl.cc",
+ "src/google/protobuf/map_field.cc",
+ "src/google/protobuf/message.cc",
+ "src/google/protobuf/reflection_ops.cc",
+ "src/google/protobuf/service.cc",
+ "src/google/protobuf/source_context.pb.cc",
+ "src/google/protobuf/struct.pb.cc",
+ "src/google/protobuf/stubs/mathlimits.cc",
+ "src/google/protobuf/stubs/substitute.cc",
+ "src/google/protobuf/text_format.cc",
+ "src/google/protobuf/timestamp.pb.cc",
+ "src/google/protobuf/type.pb.cc",
+ "src/google/protobuf/unknown_field_set.cc",
+ "src/google/protobuf/util/field_comparator.cc",
+ "src/google/protobuf/util/field_mask_util.cc",
+ "src/google/protobuf/util/internal/datapiece.cc",
+ "src/google/protobuf/util/internal/default_value_objectwriter.cc",
+ "src/google/protobuf/util/internal/error_listener.cc",
+ "src/google/protobuf/util/internal/field_mask_utility.cc",
+ "src/google/protobuf/util/internal/json_escaping.cc",
+ "src/google/protobuf/util/internal/json_objectwriter.cc",
+ "src/google/protobuf/util/internal/json_stream_parser.cc",
+ "src/google/protobuf/util/internal/object_writer.cc",
+ "src/google/protobuf/util/internal/proto_writer.cc",
+ "src/google/protobuf/util/internal/protostream_objectsource.cc",
+ "src/google/protobuf/util/internal/protostream_objectwriter.cc",
+ "src/google/protobuf/util/internal/type_info.cc",
+ "src/google/protobuf/util/internal/type_info_test_helper.cc",
+ "src/google/protobuf/util/internal/utility.cc",
+ "src/google/protobuf/util/json_util.cc",
+ "src/google/protobuf/util/message_differencer.cc",
+ "src/google/protobuf/util/time_util.cc",
+ "src/google/protobuf/util/type_resolver_util.cc",
+ "src/google/protobuf/wire_format.cc",
+ "src/google/protobuf/wrappers.pb.cc",
+ ],
+ hdrs = glob(["src/**/*.h"]),
+ copts = COPTS,
+ includes = ["src/"],
+ linkopts = LINK_OPTS,
+ visibility = ["//visibility:public"],
+ deps = [":protobuf_lite"],
+)
+
+cc_library(
+ name = "protoc_lib",
+ srcs = [
+ # AUTOGEN(protoc_lib_srcs)
+ "src/google/protobuf/compiler/code_generator.cc",
+ "src/google/protobuf/compiler/command_line_interface.cc",
+ "src/google/protobuf/compiler/cpp/cpp_enum.cc",
+ "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
+ "src/google/protobuf/compiler/cpp/cpp_extension.cc",
+ "src/google/protobuf/compiler/cpp/cpp_field.cc",
+ "src/google/protobuf/compiler/cpp/cpp_file.cc",
+ "src/google/protobuf/compiler/cpp/cpp_generator.cc",
+ "src/google/protobuf/compiler/cpp/cpp_helpers.cc",
+ "src/google/protobuf/compiler/cpp/cpp_map_field.cc",
+ "src/google/protobuf/compiler/cpp/cpp_message.cc",
+ "src/google/protobuf/compiler/cpp/cpp_message_field.cc",
+ "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
+ "src/google/protobuf/compiler/cpp/cpp_service.cc",
+ "src/google/protobuf/compiler/cpp/cpp_string_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
+ "src/google/protobuf/compiler/csharp/csharp_enum.cc",
+ "src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_field_base.cc",
+ "src/google/protobuf/compiler/csharp/csharp_generator.cc",
+ "src/google/protobuf/compiler/csharp/csharp_helpers.cc",
+ "src/google/protobuf/compiler/csharp/csharp_map_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_message.cc",
+ "src/google/protobuf/compiler/csharp/csharp_message_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
+ "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
+ "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
+ "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
+ "src/google/protobuf/compiler/java/java_context.cc",
+ "src/google/protobuf/compiler/java/java_doc_comment.cc",
+ "src/google/protobuf/compiler/java/java_enum.cc",
+ "src/google/protobuf/compiler/java/java_enum_field.cc",
+ "src/google/protobuf/compiler/java/java_enum_field_lite.cc",
+ "src/google/protobuf/compiler/java/java_enum_lite.cc",
+ "src/google/protobuf/compiler/java/java_extension.cc",
+ "src/google/protobuf/compiler/java/java_extension_lite.cc",
+ "src/google/protobuf/compiler/java/java_field.cc",
+ "src/google/protobuf/compiler/java/java_file.cc",
+ "src/google/protobuf/compiler/java/java_generator.cc",
+ "src/google/protobuf/compiler/java/java_generator_factory.cc",
+ "src/google/protobuf/compiler/java/java_helpers.cc",
+ "src/google/protobuf/compiler/java/java_lazy_message_field.cc",
+ "src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc",
+ "src/google/protobuf/compiler/java/java_map_field.cc",
+ "src/google/protobuf/compiler/java/java_map_field_lite.cc",
+ "src/google/protobuf/compiler/java/java_message.cc",
+ "src/google/protobuf/compiler/java/java_message_builder.cc",
+ "src/google/protobuf/compiler/java/java_message_builder_lite.cc",
+ "src/google/protobuf/compiler/java/java_message_field.cc",
+ "src/google/protobuf/compiler/java/java_message_field_lite.cc",
+ "src/google/protobuf/compiler/java/java_message_lite.cc",
+ "src/google/protobuf/compiler/java/java_name_resolver.cc",
+ "src/google/protobuf/compiler/java/java_primitive_field.cc",
+ "src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
+ "src/google/protobuf/compiler/java/java_service.cc",
+ "src/google/protobuf/compiler/java/java_shared_code_generator.cc",
+ "src/google/protobuf/compiler/java/java_string_field.cc",
+ "src/google/protobuf/compiler/java/java_string_field_lite.cc",
+ "src/google/protobuf/compiler/javanano/javanano_enum.cc",
+ "src/google/protobuf/compiler/javanano/javanano_enum_field.cc",
+ "src/google/protobuf/compiler/javanano/javanano_extension.cc",
+ "src/google/protobuf/compiler/javanano/javanano_field.cc",
+ "src/google/protobuf/compiler/javanano/javanano_file.cc",
+ "src/google/protobuf/compiler/javanano/javanano_generator.cc",
+ "src/google/protobuf/compiler/javanano/javanano_helpers.cc",
+ "src/google/protobuf/compiler/javanano/javanano_map_field.cc",
+ "src/google/protobuf/compiler/javanano/javanano_message.cc",
+ "src/google/protobuf/compiler/javanano/javanano_message_field.cc",
+ "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc",
+ "src/google/protobuf/compiler/js/js_generator.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_field.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_file.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_message.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
+ "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
+ "src/google/protobuf/compiler/plugin.cc",
+ "src/google/protobuf/compiler/plugin.pb.cc",
+ "src/google/protobuf/compiler/python/python_generator.cc",
+ "src/google/protobuf/compiler/ruby/ruby_generator.cc",
+ "src/google/protobuf/compiler/subprocess.cc",
+ "src/google/protobuf/compiler/zip_writer.cc",
+ ],
+ copts = COPTS,
+ includes = ["src/"],
+ linkopts = LINK_OPTS,
+ visibility = ["//visibility:public"],
+ deps = [":protobuf_clib"],
+)
+
+proto_lang_toolchain(
+ name = "java_toolchain",
+ command_line = "--java_out=shared,immutable:$(OUT)",
+ runtime = ":protobuf",
+)
+
+cc_binary(
+ name = "protoc",
+ srcs = ["src/google/protobuf/compiler/main.cc"],
+ linkopts = LINK_OPTS,
+ visibility = ["//visibility:public"],
+ deps = [":protoc_lib"],
+)
diff --git a/third_party/protobuf/3.0.0/com_google_protobuf_java.BUILD b/third_party/protobuf/3.0.0/com_google_protobuf_java.BUILD
new file mode 100644
index 0000000000..fe8e3f0fcb
--- /dev/null
+++ b/third_party/protobuf/3.0.0/com_google_protobuf_java.BUILD
@@ -0,0 +1,11 @@
+java_import(
+ name = "protobuf",
+ jars = ["protobuf-java-3.0.0.jar"],
+)
+
+proto_lang_toolchain(
+ name = "java_toolchain",
+ command_line = "--java_out=shared,immutable:$(OUT)",
+ runtime = ":protobuf",
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD
new file mode 100644
index 0000000000..f6e1ea9fda
--- /dev/null
+++ b/third_party/protobuf/BUILD
@@ -0,0 +1,33 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(":proto_alias.bzl", "proto_alias")
+
+PROTOBUF_VERSION = "3.0.0"
+
+filegroup(
+ name = "srcs",
+ srcs = [
+ "//third_party/protobuf/" + PROTOBUF_VERSION + ":srcs",
+ ] + glob(["**"]), # glob everything to satisfy the compile.sh srcs test
+ visibility = ["//third_party:__pkg__"],
+)
+
+proto_alias("protoc", PROTOBUF_VERSION)
+
+proto_alias("protobuf", PROTOBUF_VERSION)
+
+proto_alias("protobuf-jars", PROTOBUF_VERSION)
+
+proto_alias("protobuf_python_srcs", PROTOBUF_VERSION)
+
+proto_alias("protobuf_python", PROTOBUF_VERSION)
+
+proto_alias("protobuf_lite", PROTOBUF_VERSION)
+
+proto_alias("protobuf_clib", PROTOBUF_VERSION)
+
+proto_alias("protoc_lib", PROTOBUF_VERSION)
+
+proto_alias("java_toolchain", PROTOBUF_VERSION)
diff --git a/third_party/protobuf/README.md b/third_party/protobuf/README.md
new file mode 100644
index 0000000000..367d542d06
--- /dev/null
+++ b/third_party/protobuf/README.md
@@ -0,0 +1,28 @@
+### Updating the jar binary
+
+1. Go to http://search.maven.org/
+2. Search for g:"com.google.protobuf"
+3. Download the "jar" link from protobuf-java and put them in `<Bazel tree>/third_party/protobuf/<version>`
+
+* * *
+### Updating `protobuf.bzl` and the `src/` directory:
+
+1. `git clone http://github.com/google/protobuf.git`
+2. `git checkout <tag or commithash>` (e.g. `v3.0.0` or `e8ae137`)
+3. `mkdir -p third_party/protobuf/<version>/src/google` in the root of the Bazel tree.
+4. `cp -R <root of protobuf tree>/src/google/protobuf third_party/protobuf/src/google`
+5. Update the rules in `third_party/protobuf/BUILD` with the rules in the protobuf repository.
+
+Finally, update the rules:
+
+1. Add a BUILD file to `third_party/protobuf/<version>/`. Use the BUILD file
+ for the previous version as a template. Update the `cc_library` rules to
+ match the rules in the BUILD file in the protobuf repository. Also copy
+ `protobuf.bzl` from the protobuf repository into
+ `third_party/protobuf/<version>/`.
+2. Modify `third_party/protobuf/BUILD` to point to the new rules.
+3. Delete the old version of protobuf.
+
+* * *
+### Updating anything else in the directory
+Follow usual procedure as described on https://www.bazel.build/contributing.html
diff --git a/third_party/protobuf/proto_alias.bzl b/third_party/protobuf/proto_alias.bzl
new file mode 100644
index 0000000000..e47728f96d
--- /dev/null
+++ b/third_party/protobuf/proto_alias.bzl
@@ -0,0 +1,18 @@
+# Copyright 2016 The Bazel Authors. All rights reserved.
+#
+# 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.
+
+def proto_alias(name, version):
+ native.alias(
+ name = name,
+ actual = "//third_party/protobuf/" + version + ":" + name)
diff --git a/third_party/py/concurrent/BUILD b/third_party/py/concurrent/BUILD
new file mode 100644
index 0000000000..ccc3faa03d
--- /dev/null
+++ b/third_party/py/concurrent/BUILD
@@ -0,0 +1,13 @@
+licenses(["notice"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//visibility:public"],
+)
+
+py_library(
+ name = "futures",
+ srcs = glob(["**/*.py"]),
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/py/concurrent/README.md b/third_party/py/concurrent/README.md
new file mode 100644
index 0000000000..9973ba08f9
--- /dev/null
+++ b/third_party/py/concurrent/README.md
@@ -0,0 +1,8 @@
+[concurrent](https://github.com/agronholm/pythonfutures)
+--------
+
+Backport of the concurrent.futures package from Python 3.2, version 2.1.2
+
+* Version: 2.1.2
+* License: BSD License
+* From: [http://pypi.python.org/packages/source/f/futures/futures-2.1.2.tar.gz](http://pypi.python.org/packages/source/f/futures/futures-2.1.2.tar.gz)
diff --git a/third_party/py/gflags/BUILD b/third_party/py/gflags/BUILD
new file mode 100644
index 0000000000..77f2722818
--- /dev/null
+++ b/third_party/py/gflags/BUILD
@@ -0,0 +1,17 @@
+licenses(["notice"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//visibility:public"],
+)
+
+py_library(
+ name = "gflags",
+ srcs = [
+ "__init__.py",
+ "gflags_validators.py",
+ ],
+ srcs_version = "PY2AND3",
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/py/gflags/README.md b/third_party/py/gflags/README.md
new file mode 100644
index 0000000000..da2a03fc1c
--- /dev/null
+++ b/third_party/py/gflags/README.md
@@ -0,0 +1,6 @@
+[gflags](https://python-gflags.googlecode.com)
+--------
+
+* Version: 2.0
+* License: New BSD License
+* From: [https://python-gflags.googlecode.com/files/python-gflags-2.0.tar.gz](https://python-gflags.googlecode.com/files/python-gflags-2.0.tar.gz)
diff --git a/third_party/py/mock/BUILD b/third_party/py/mock/BUILD
new file mode 100644
index 0000000000..2d4961de9e
--- /dev/null
+++ b/third_party/py/mock/BUILD
@@ -0,0 +1,13 @@
+licenses(["notice"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+py_library(
+ name = "mock",
+ srcs = ["__init__.py"],
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/py/mock/README.md b/third_party/py/mock/README.md
new file mode 100644
index 0000000000..26a0707dbd
--- /dev/null
+++ b/third_party/py/mock/README.md
@@ -0,0 +1,6 @@
+[mock](http://www.voidspace.org.uk/python/mock/)
+--------
+
+* Version: 1.0.1
+* License: BSD License
+* From: [http://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz](http://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz)
diff --git a/third_party/py/six/BUILD b/third_party/py/six/BUILD
new file mode 100644
index 0000000000..39ce3a1fa8
--- /dev/null
+++ b/third_party/py/six/BUILD
@@ -0,0 +1,15 @@
+licenses(["notice"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+py_library(
+ name = "six",
+ srcs = ["six.py"],
+ imports = ["."],
+ srcs_version = "PY2AND3",
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/py/six/README.md b/third_party/py/six/README.md
new file mode 100644
index 0000000000..c409b20853
--- /dev/null
+++ b/third_party/py/six/README.md
@@ -0,0 +1,6 @@
+[six](https://pythonhosted.org/six/)
+------
+
+* Version: 1.10.0
+* License: MIT
+* From: [https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz](https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz)
diff --git a/third_party/zlib/BUILD b/third_party/zlib/BUILD
new file mode 100644
index 0000000000..4186702259
--- /dev/null
+++ b/third_party/zlib/BUILD
@@ -0,0 +1,16 @@
+licenses(["notice"]) # BSD/MIT-like license
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["//third_party:__pkg__"],
+)
+
+cc_library(
+ name = "zlib",
+ srcs = glob(["*.c"]),
+ hdrs = glob(["*.h"]),
+ copts = ["-w"],
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)