Skip to content

Commit 7f1b8f1

Browse files
authored
Run buildifier --lint=fix -r . (bazelbuild#126)
This fixes future Bazel incompatibilities. Updated WORKSPACE files manually.
1 parent cc4b351 commit 7f1b8f1

File tree

22 files changed

+92
-18
lines changed

22 files changed

+92
-18
lines changed

android/firebase-cloud-messaging/WORKSPACE

+26-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22

33
# Requires ANDROID_HOME set to the path of your Android SDK.
44
android_sdk_repository(
5-
name = "androidsdk",
5+
name = "androidsdk",
66
)
77

88
RULES_JVM_EXTERNAL_TAG = "2.8"
9+
910
RULES_JVM_EXTERNAL_SHA = "79c9850690d7614ecdb72d68394f994fef7534b292c4867ce5e7dec0aa7bdfad"
1011

1112
http_archive(
1213
name = "rules_jvm_external",
13-
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
1414
sha256 = RULES_JVM_EXTERNAL_SHA,
15+
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
1516
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
1617
)
1718

@@ -23,19 +24,37 @@ maven_install(
2324
"com.android.support:appcompat-v7:26.1.0",
2425
"com.android.support.constraint:constraint-layout:1.0.2",
2526
],
27+
fetch_sources = True,
2628
repositories = [
2729
"https://jcenter.bintray.com/",
2830
"https://maven.google.com",
2931
],
30-
fetch_sources = True,
3132
)
3233

3334
TOOLS_ANDROID_COMMIT = "0e864ba5a86958513658250de587416d8e17c481"
35+
3436
http_archive(
35-
name = "tools_android",
36-
strip_prefix = "tools_android-" + TOOLS_ANDROID_COMMIT,
37-
url = "https://github.com/bazelbuild/tools_android/archive/%s.tar.gz" % TOOLS_ANDROID_COMMIT,
38-
sha256 = "57c50d6331ba578fc8adfcede20ef12b437cb4cc2edf60c852e4b834eefee5fc",
37+
name = "tools_android",
38+
sha256 = "57c50d6331ba578fc8adfcede20ef12b437cb4cc2edf60c852e4b834eefee5fc",
39+
strip_prefix = "tools_android-" + TOOLS_ANDROID_COMMIT,
40+
url = "https://github.com/bazelbuild/tools_android/archive/%s.tar.gz" % TOOLS_ANDROID_COMMIT,
3941
)
42+
4043
load("@tools_android//tools/googleservices:defs.bzl", "google_services_workspace_dependencies")
44+
4145
google_services_workspace_dependencies()
46+
47+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
48+
http_archive(
49+
name = "rules_android",
50+
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
51+
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
52+
strip_prefix = "rules_android-0.1.1",
53+
)
54+
55+
http_archive(
56+
name = "rules_cc",
57+
url = "https://github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.zip",
58+
sha256 = "8c7e8bf24a2bf515713445199a677ee2336e1c487fa1da41037c6026de04bbc3",
59+
strip_prefix = "rules_cc-624b5d59dfb45672d4239422fa1e3de1822ee110",
60+
)

android/firebase-cloud-messaging/app/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_android//android:rules.bzl", "android_binary")
12
load("@tools_android//tools/googleservices:defs.bzl", "google_services_xml")
23

34
GOOGLE_SERVICES_XML = google_services_xml(

android/ndk/WORKSPACE

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ android_ndk_repository(name = "androidndk")
66
GMAVEN_TAG = "20180625-1"
77

88
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
9+
910
http_archive(
1011
name = "gmaven_rules",
1112
strip_prefix = "gmaven_rules-%s" % GMAVEN_TAG,
@@ -15,3 +16,10 @@ http_archive(
1516
load("@gmaven_rules//:gmaven.bzl", "gmaven_rules")
1617

1718
gmaven_rules()
19+
20+
http_archive(
21+
name = "rules_android",
22+
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
23+
strip_prefix = "rules_android-0.1.1",
24+
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
25+
)

android/ndk/app/src/main/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
load("@rules_android//android:rules.bzl", "android_binary", "android_library")
13
load("@gmaven_rules//:defs.bzl", "gmaven_artifact")
24

35
android_library(

cpp-tutorial/stage1/main/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary")
2+
13
cc_binary(
24
name = "hello-world",
35
srcs = ["hello-world.cc"],

cpp-tutorial/stage2/main/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2+
13
cc_library(
24
name = "hello-greet",
35
srcs = ["hello-greet.cc"],

cpp-tutorial/stage3/lib/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
13
cc_library(
24
name = "hello-time",
35
srcs = ["hello-time.cc"],

cpp-tutorial/stage3/main/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2+
13
cc_library(
24
name = "hello-greet",
35
srcs = ["hello-greet.cc"],

java-maven/BUILD

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_test")
2+
13
package(default_visibility = ["//visibility:public"])
24

35
java_library(
@@ -18,7 +20,7 @@ java_test(
1820
test_class = "com.example.myproject.TestApp",
1921
deps = [
2022
":java-maven-lib",
21-
"@maven//:junit_junit",
2223
"@maven//:com_google_guava_guava",
24+
"@maven//:junit_junit",
2325
],
2426
)

java-maven/WORKSPACE

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22

33
RULES_JVM_EXTERNAL_TAG = "2.5"
4+
45
RULES_JVM_EXTERNAL_SHA = "249e8129914be6d987ca57754516be35a14ea866c616041ff0cd32ea94d2f3a1"
56

67
http_archive(
78
name = "rules_jvm_external",
8-
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
99
sha256 = RULES_JVM_EXTERNAL_SHA,
10+
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
1011
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
1112
)
1213

@@ -17,9 +18,9 @@ maven_install(
1718
"junit:junit:4.12",
1819
"com.google.guava:guava:28.0-jre",
1920
],
21+
fetch_sources = True,
2022
repositories = [
2123
"http://uk.maven.org/maven2",
2224
"https://jcenter.bintray.com/",
2325
],
24-
fetch_sources = True,
2526
)

java-tutorial/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:defs.bzl", "java_binary")
2+
13
java_binary(
24
name = "ProjectRunner",
35
srcs = glob(["src/main/java/com/example/*.java"]),

java-tutorial/src/main/java/com/example/cmdline/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:defs.bzl", "java_binary")
2+
13
java_binary(
24
name = "runner",
35
srcs = ["Runner.java"],

rules/WORKSPACE

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2+
3+
http_archive(
4+
name = "rules_python",
5+
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
6+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
7+
)
8+
9+
load("@rules_python//python:repositories.bzl", "py_repositories")
10+
11+
py_repositories()
12+
13+
# Only needed if using the packaging rules.
14+
load("@rules_python//python:pip.bzl", "pip_repositories")
15+
16+
pip_repositories()

rules/actions_run/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ sh_binary(
2929
config_setting(
3030
name = "on_linux",
3131
constraint_values = [
32-
"@platforms//os:linux"
32+
"@platforms//os:linux",
3333
],
3434
)
3535

3636
config_setting(
3737
name = "on_windows",
3838
constraint_values = [
39-
"@platforms//os:windows"
39+
"@platforms//os:windows",
4040
],
41-
)
41+
)

rules/aspect/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
12
load(":file_collector.bzl", "file_collector")
23

34
cc_library(

rules/depsets/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_python//python:defs.bzl", "py_binary")
12
load(":foo.bzl", "foo_binary", "foo_library")
23

34
# Our hypothetical Foo compiler.

rules/expand_template/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary")
12
load("//expand_template:hello.bzl", "hello")
23

34
# Generates a C++ source file that says "Hello John!".

rules/shell_command/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Build with:
66
# bazel build //shell_command:*
77

8-
load(":rules.bzl", "emit_size", "convert_to_uppercase")
8+
load(":rules.bzl", "convert_to_uppercase", "emit_size")
99

1010
emit_size(
1111
name = "foo",

tutorial/WORKSPACE

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
32

43
http_archive(
54
name = "build_bazel_rules_apple",
6-
strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
75
sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
6+
strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
87
url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
98
)
109

@@ -44,3 +43,10 @@ load(
4443
java_appengine_repositories()
4544

4645
android_sdk_repository(name = "androidsdk")
46+
47+
http_archive(
48+
name = "rules_android",
49+
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
50+
strip_prefix = "rules_android-0.1.1",
51+
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
52+
)

tutorial/android/BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_android//android:rules.bzl", "android_binary", "android_library")
2+
13
# The final binary rule, which builds the APK and sets the application manifest,
24
# as well as any other resources needed by the application.
35
# The package for the R class for resources is normally inferred from the

tutorial/backend/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_java//java:defs.bzl", "java_binary")
12
load("@io_bazel_rules_appengine//appengine:appengine.bzl", "appengine_war")
23

34
package(default_visibility = ["//visibility:public"])

tutorial/ios-app/BUILD

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@rules_cc//cc:defs.bzl", "objc_library")
12
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
23

34
objc_library(
@@ -18,8 +19,8 @@ ios_application(
1819
"ipad",
1920
],
2021
infoplists = [":UrlGet/UrlGet-Info.plist"],
22+
launch_storyboard = "UrlGet/UrlGetViewController.xib",
23+
minimum_os_version = "8.0",
2124
visibility = ["//visibility:public"],
2225
deps = [":UrlGetClasses"],
23-
minimum_os_version = "8.0",
24-
launch_storyboard = "UrlGet/UrlGetViewController.xib",
2526
)

0 commit comments

Comments
 (0)