Skip to content

Toolchain upgrade #2360

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.5.0
18 changes: 3 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'axt_**_release_branch'

env:
cache-version: v1
cache-version: v2

jobs:
build:
Expand All @@ -20,11 +20,11 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Java 17
- name: Install Java 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-version: '21'
- name: 'Cache Bazel files'
uses: actions/cache@v4
with:
Expand All @@ -46,14 +46,8 @@ jobs:
name: local-snapshot
path: ~/download
- name: 'Clean bazel cache'
# Don't cache the bazel/external directory, since it can be > 2GB
# and is expensive to restore and save
# According to the documentation, we should be able to exclude these via
# the actions/cache path, e.g. "!~/.cache/bazel/*/*/external/" but that
# doesn't seem to work.
run: |
rm -rf $(bazel info repository_cache)
rm -rf ~/.cache/bazel/*/*/external/
shell: bash
test:
runs-on: ubuntu-latest
Expand All @@ -77,14 +71,8 @@ jobs:
run: bazelisk test --test_tag_filters=robolectric,fast --build_tag_filters=robolectric,fast --test_output=all ...
shell: bash
- name: 'Clean bazel cache'
# Don't cache the bazel/external directory, since it can be > 2GB
# and is expensive to restore and save
# According to the documentation, we should be able to exclude these via
# the actions/cache path, e.g. "!~/.cache/bazel/*/*/external/" but that
# doesn't seem to work.
run: |
rm -rf $(bazel info repository_cache)
rm -rf ~/.cache/bazel/*/*/external/
shell: bash
gradle-emulator-test:
runs-on: ubuntu-latest
Expand Down
89 changes: 89 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# These need needs to be consistent with their counterparts in build_extensions/axt_deps_versions.bzl.
KOTLIN_VERSION = "2.1.0"
KOTLINX_COROUTINES_VERSION = "1.7.1"

bazel_dep(name = "rules_java", version = "8.6.0")
bazel_dep(name = "rules_jvm_external", version = "6.6")
bazel_dep(name = "rules_android", version = "0.6.3", repo_name = "build_bazel_rules_android")
bazel_dep(name = "rules_kotlin", version = "2.1.3", repo_name = "io_bazel_rules_kotlin")
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc-java", version = "1.68.1")
bazel_dep(name = "rules_robolectric", version = "4.14.1.2", repo_name = "robolectric")

# Pin the version of rules_robolectric so that it matches the robolectric version we get from maven.
single_version_override(
module_name = "rules_robolectric",
version = "4.14.1.2",
)

# maven dependencies
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.artifact(
artifact = "accessibility-test-framework",
# exclude the org.checkerframework dependency since that require
# java8 compatibility. See b/176926990
# accessibility-test-framework depends on hamcrest 2.2 which causes 'Using type org.hamcrest.Matcher from an indirect dependency' compile errors
exclusions = [
"org.checkerframework:checker",
"org.hamcrest:hamcrest-core",
"org.hamcrest:hamcrest-library",
],
group = "com.google.android.apps.common.testing.accessibility.framework",
version = "3.1.2",
)

maven.install(
name = "maven",
artifacts = [
"androidx.annotation:annotation:1.7.0-beta01",
"androidx.concurrent:concurrent-futures:1.1.0",
"androidx.concurrent:concurrent-futures-ktx:1.1.0",
"androidx.core:core:1.6.0",
"androidx.lifecycle:lifecycle-common:2.3.1",
"androidx.multidex:multidex:2.0.0",
"androidx.tracing:tracing:1.1.0",
"androidx.window:window-java:1.1.0",
"androidx.window:window-core:1.1.0",
"com.google.dagger:dagger-compiler:2.46",
"com.google.dagger:dagger-producers:2.46",
"com.google.dagger:dagger:2.46",
"com.google.googlejavaformat:google-java-format:1.4",
"com.squareup:javapoet:1.9.0",
"io.grpc:grpc-okhttp:1.54.1",
"io.grpc:grpc-stub:1.54.1",
"junit:junit:4.13.2",
"org.ccil.cowan.tagsoup:tagsoup:1.2.1",
"org.hamcrest:hamcrest-library:1.3",
"org.pantsbuild:jarjar:1.7.2",
"org.jetbrains.kotlin:kotlin-stdlib:%s" % KOTLIN_VERSION,
"org.jetbrains.kotlinx:kotlinx-coroutines-core:%s" % KOTLINX_COROUTINES_VERSION,
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:%s" % KOTLINX_COROUTINES_VERSION,
"org.jetbrains.kotlinx:kotlinx-coroutines-android:%s" % KOTLINX_COROUTINES_VERSION,
"org.robolectric:robolectric:4.14.1",
],
fetch_sources = True,
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
"https://dl.bintray.com/linkedin/maven",
],
)

use_repo(maven, "maven")

# need to have a isolated version tree for listenablefuture, because otherwise
# listenablefuture will get resolved to 9999.0-empty-to-avoid-conflict-with-guava
maven.install(
name = "maven_listenablefuture",
artifacts = [
"com.google.guava:listenablefuture:1.0",
],
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
"https://dl.bintray.com/linkedin/maven",
],
)
use_repo(maven, "maven_listenablefuture")

Loading
Loading