Skip to content

Commit

Permalink
FhirProto Java has grown beyond a single BUILD file. Moves to per-dir…
Browse files Browse the repository at this point in the history
…ectory BUILD files. To avoid long and redundant paths, collapses:

`@com_google_fhirproto//java/src/main/java` to `@com_google_fhirproto//java`

and

`@com_google_fhirproto//java/src/test/java` to `@com_google_fhirproto//javatests`

PiperOrigin-RevId: 345293915
  • Loading branch information
nickgeorge committed Dec 2, 2020
1 parent fd551d9 commit 4495912
Show file tree
Hide file tree
Showing 91 changed files with 877 additions and 853 deletions.
4 changes: 2 additions & 2 deletions bazel/protogen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

STU3_PACKAGE_DEP = "@com_google_fhir//spec:fhir_stu3_package"
R4_PACKAGE_DEP = "@com_google_fhir//spec:fhir_r4_package"
PROTO_GENERATOR = "@com_google_fhir//java:ProtoGenerator"
PROFILE_GENERATOR = "@com_google_fhir//java:ProfileGenerator"
PROTO_GENERATOR = "@com_google_fhir//java/com/google/fhir/protogen:ProtoGenerator"
PROFILE_GENERATOR = "@com_google_fhir//java/com/google/fhir/protogen:ProfileGenerator"

MANUAL_TAGS = ["manual"]

Expand Down
6 changes: 3 additions & 3 deletions bazel/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def fhirproto_workspace(core_lib = False):
protogen_prefix = "//" if core_lib else "@com_google_fhir//"
native.bind(
name = "proto_generator_test_utils",
actual = protogen_prefix + "java:proto_generator_test_utils",
actual = protogen_prefix + "java/com/google/fhir/protogen:proto_generator_test_utils",
)
native.bind(
name = "protogen",
actual = protogen_prefix + "java:protogen",
actual = protogen_prefix + "java/com/google/fhir/protogen:protogen",
)
native.bind(
name = "GeneratedProtoTest.java",
actual = protogen_prefix + "java:GeneratedProtoTest.java",
actual = protogen_prefix + "javatests/com/google/fhir/protogen:GeneratedProtoTest.java",
)
4 changes: 2 additions & 2 deletions examples/bigquery/02-split-bundles-by-resource-type.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [[ $# -eq 0 ]] ; then
exit 1
fi

bazel build //java:SplitBundle
bazel build //java/com/google/fhir/examples:SplitBundle

SPLIT_BUNDLE=bazel-bin/java/SplitBundle
SPLIT_BUNDLE=bazel-bin/java/com/google/examples/SplitBundle

$SPLIT_BUNDLE $1 $1/synthea/output/fhir/*.json

2 changes: 1 addition & 1 deletion examples/bulkdata/02-parse-into-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ fi

echo "converting FHIR files in $1"

bazel run //java:ConvertNdJsonForBigQuery -- --output_directory $1 $1/*.ndjson
bazel run //java/com/google/fhir/examples:ConvertNdJsonForBigQuery -- --output_directory $1 $1/*.ndjson
gzip $1/*.prototxt
2 changes: 1 addition & 1 deletion examples/gcp_datalab/05-gen-bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [[ $# -eq 0 ]] ; then
exit 1
fi

bazel build -c opt //java:SyntheaToTFRecords
bazel build -c opt //java/com/google/fhir/examples:SyntheaToTFRecords

SYNTHEA_TO_TF_RECORDS=$(pwd)/../../bazel-bin/java/SyntheaToTFRecords

Expand Down
2 changes: 1 addition & 1 deletion examples/protogen/generate-r4-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COMMON_FLAGS=" \
--descriptor_output_directory $DESCRIPTOR_OUTPUT_PATH "
#
# Build the binary.
bazel build //java:ProtoGenerator
bazel build //java/com/google/fhir/protogen:ProtoGenerator

if [ $? -ne 0 ]
then
Expand Down
Loading

0 comments on commit 4495912

Please sign in to comment.