common --enable_bzlmod
# Use built-in protoc
common --incompatible_enable_proto_toolchain_resolution
common --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true

# Ensure that we don't accidentally build protobuf or gRPC
common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
build --java_runtime_version=remotejdk_11
build --java_language_version=11


# Hide Java 8 deprecation warnings.
common --javacopt=-Xlint:-options

# Remove flag once https://github.com/google/cel-spec/issues/508 and rules_jvm_external is fixed.
common --incompatible_autoload_externally=proto_library,cc_proto_library,java_proto_library,java_test

# Limit repository cache size by not caching extracted repository contents
build --repo_contents_cache=

