Skip to content

Commit

Permalink
Update to JDK 17 (#178)
Browse files Browse the repository at this point in the history
Fixes #178
  • Loading branch information
arunkumar9t2 committed Jul 9, 2024
1 parent 43dd907 commit 32f9c52
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
22 changes: 13 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ 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
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 +44,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 +82,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/[email protected]
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

0 comments on commit 32f9c52

Please sign in to comment.