Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to JDK 17 #178

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ common --incompatible_strict_action_env
common --reuse_sandbox_directories
common --repo_env=RJE_VERBOSE=true

# Workers
common --worker_verbose
common --experimental_worker_multiplex
common --experimental_shrink_worker_pool
common --experimental_worker_for_repo_fetching=platform

# JAVA - START
common --experimental_strict_java_deps=off # Turn off strict java deps
common --java_runtime_version=remotejdk_11 # Use inbuilt Java 11 for hermeticity
common --tool_java_runtime_version=remotejdk_11
common --java_runtime_version=remotejdk_17 # Use inbuilt Java 17 for hermeticity
common --tool_java_runtime_version=remotejdk_17
common --tool_java_language_version=17
common --java_language_version=17
## See https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Locale.html#legacy_language_codes
common --jvmopt="-Djava.locale.providers=COMPAT,SPI" # Use Java 8 default locale provider
common --jvmopt="--add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED"
common --experimental_java_classpath=bazel
common --experimental_java_header_input_pruning
# JAVA - END
Expand All @@ -47,9 +45,16 @@ common --output_library_merged_assets=false # Turn off asset merging artifact
# common --experimental_use_package_aware_rtxt=true # Use package aware R.txt files (required for databinding)
# common --define=nontransitive_r_class=1 # Adapt bazel common rules for non transitive R class

# Workers
common --worker_verbose
common --experimental_worker_multiplex
common --experimental_shrink_worker_pool
common --experimental_worker_for_repo_fetching=platform

common --experimental_persistent_aar_extractor
common --persistent_multiplex_android_tools
common --persistent_android_dex_desugar

common --strategy=DatabindingStubs=worker
common --worker_max_instances=Javac=1
common --worker_max_instances=KotlinCompile=1
Expand Down Expand Up @@ -78,6 +83,6 @@ run --ui_event_filters=-info,-stdout --noshow_progress

# Ci Config
common:ci --noshow_progress
common:ci --color=no
common:ci --color=yes

try-import local.bazelrc
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.2.1
22 changes: 11 additions & 11 deletions .github/actions/bazel/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Run Bazel Command'
description: 'Ensures bazelisk, mounts Bazel Cache from artifacts and runs Bazel command'
description: 'Runs bazel command with setup-bazel'
inputs:
bazel-config:
description: 'The bazel configuration to use.'
Expand All @@ -17,19 +17,19 @@ inputs:
runs:
using: "composite"
steps:
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Install JDK 11
uses: actions/setup-java@v3
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "11"

- name: Mount bazel cache
uses: actions/cache@v3
java-version: "17"
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.8.5
with:
path: "bazel-cache"
key: ${{ inputs.cache-key }}
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ inputs.cache-key }}-${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true

- name: Run bazel command
shell: bash
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Build workflow
name: CI workflow

on:
push:
branches:
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Bazel build
uses: ./.github/actions/bazel
with:
Expand All @@ -20,7 +24,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Bazel build
uses: ./.github/actions/bazel
with:
Expand All @@ -30,7 +34,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Bazel test
uses: ./.github/actions/bazel
with:
Expand Down
Loading