-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
seperate defalt value related files and same to resource name (#630)
- Loading branch information
1 parent
c785470
commit 2085654
Showing
29 changed files
with
197 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/google/api/generator/gapic/composer/defaultvalue/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
load("@rules_java//java:defs.bzl", "java_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "defaultvalue_files", | ||
srcs = glob(["*.java"]), | ||
) | ||
|
||
java_library( | ||
name = "defaultvalue", | ||
srcs = [ | ||
":defaultvalue_files", | ||
], | ||
deps = [ | ||
"//src/main/java/com/google/api/generator/engine/ast", | ||
"//src/main/java/com/google/api/generator/gapic/composer/resourcename", | ||
"//src/main/java/com/google/api/generator/gapic/model", | ||
"//src/main/java/com/google/api/generator/gapic/utils", | ||
"@com_google_googleapis//google/longrunning:longrunning_java_proto", | ||
"@com_google_guava_guava//jar", | ||
"@com_google_protobuf//java/core", | ||
"@google_java_format_all_deps//jar", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/google/api/generator/gapic/composer/resourcename/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
load("@rules_java//java:defs.bzl", "java_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "resourcename_files", | ||
srcs = glob(["*.java"]), | ||
) | ||
|
||
java_library( | ||
name = "resourcename", | ||
srcs = [ | ||
":resourcename_files", | ||
], | ||
deps = [ | ||
"//src/main/java/com/google/api/generator/engine/ast", | ||
"//src/main/java/com/google/api/generator/gapic/composer/comment", | ||
"//src/main/java/com/google/api/generator/gapic/composer/store", | ||
"//src/main/java/com/google/api/generator/gapic/model", | ||
"//src/main/java/com/google/api/generator/gapic/utils", | ||
"@com_google_api_api_common", | ||
"@com_google_guava_guava", | ||
"@javax_annotation_javax_annotation_api", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/test/java/com/google/api/generator/gapic/composer/constants/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
load("@rules_java//java:defs.bzl", "java_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "constants_files", | ||
srcs = glob(["*.java"]), | ||
) | ||
|
||
java_binary( | ||
name = "constants", | ||
srcs = ["constants_files"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/test/java/com/google/api/generator/gapic/composer/defaultvalue/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
load("@rules_java//java:defs.bzl", "java_test") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
TESTS = [ | ||
"DefaultValueComposerTest", | ||
] | ||
|
||
filegroup( | ||
name = "defaultvalue_files", | ||
srcs = ["{0}.java".format(f) for f in TESTS], | ||
) | ||
|
||
[java_test( | ||
name = test_name, | ||
srcs = ["{0}.java".format(test_name)], | ||
test_class = "com.google.api.generator.gapic.composer.defaultvalue.{0}".format(test_name), | ||
deps = [ | ||
":common_resources_java_proto", | ||
"//src/main/java/com/google/api/generator/engine/ast", | ||
"//src/main/java/com/google/api/generator/engine/writer", | ||
"//src/main/java/com/google/api/generator/gapic/composer/defaultvalue", | ||
"//src/main/java/com/google/api/generator/gapic/model", | ||
"//src/main/java/com/google/api/generator/gapic/protoparser", | ||
"//src/test/java/com/google/api/generator/gapic/testdata:showcase_java_proto", | ||
"//src/test/java/com/google/api/generator/gapic/testdata:testgapic_java_proto", | ||
"//src/test/java/com/google/api/generator/test/framework:asserts", | ||
"//src/test/java/com/google/api/generator/test/framework:utils", | ||
"//src/test/java/com/google/api/generator/testutils", | ||
"@com_google_api_api_common//jar", | ||
"@com_google_api_gax_java//gax", | ||
"@com_google_googleapis//google/rpc:rpc_java_proto", | ||
"@com_google_guava_guava", | ||
"@com_google_protobuf//:protobuf_java", | ||
"@com_google_truth_truth//jar", | ||
"@junit_junit//jar", | ||
], | ||
) for test_name in TESTS] | ||
|
||
java_proto_library( | ||
name = "common_resources_java_proto", | ||
deps = [ | ||
"@com_google_googleapis//google/cloud:common_resources_proto", | ||
], | ||
) |
Oops, something went wrong.