Skip to content

Commit

Permalink
Set Java version to fix remote execution builds (#349)
Browse files Browse the repository at this point in the history
This sets `--java_runtime_version` and `--java_language_version` to fix
remote execution builds that otherwise fail with the error:

```txt
$ bazel build --config=engflow //java/...

ERROR: .../java/com/engflow/notificationqueue/BUILD:37:12:
  While resolving toolchains for target
  //java/com/engflow/notificationqueue:client (e53c356):
  No matching toolchains found for types
  @@bazel_tools//tools/jdk:runtime_toolchain_type.

ERROR: Analysis of target '//java/com/engflow/notificationqueue:client'
  failed; build aborted
```

This affects the other `rules_java`/JVM based targets under `//kotlin`
and `//scala` as well. Local builds continue to pass.
  • Loading branch information
mbland authored Nov 1, 2024
1 parent 2564317 commit 550a7c0
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 256 deletions.
5 changes: 3 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
common --noincompatible_check_sharding_support

build --java_runtime_version=remotejdk_11
build --java_language_version=11

build:engflow_common --jobs=40
build:engflow_common --define=EXECUTOR=remote
build:engflow_common --disk_cache=
Expand All @@ -23,8 +26,6 @@ build:ci --test_output=summary
build:ci --show_progress_rate_limit=2.0
build:ci --nobuild_runfile_links
build:ci --keep_going
build:ci --java_runtime_version=remotejdk_11
build:ci --java_language_version=11

# Additional clang toolchain options for automatically configured toolchains.
build --cxxopt="-std=c++14"
Expand Down
Loading

0 comments on commit 550a7c0

Please sign in to comment.