Skip to content

java: move the Android SDK aspect to android/private/quality (closes #14418) - #14429

Merged
TrapsterDK merged 4 commits into
mainfrom
issue-14418-android-sdk-aspect
Nov 21, 2026
Merged

TrapsterDK merged 4 commits into
mainfrom
issue-14418-android-sdk-aspect

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Closes #14418

Stacked on #14412 (issue-14402-scala-quality); rebase onto main if that squash-merges first.

Changes

  • android/private/quality/android_sdk.bzl: android_sdk_aspect (from jvm_check.bzl), attr_aspects = ["upstream"], provides = [JvmAndroidSdkInfo], empty jars for non-Android kinds. Only file that loads @rules_android for quality.
  • java/private/quality/jvm_info.bzl: load-free JvmAndroidSdkInfo and android_sdk_jars.
  • jvm_check_aspect and real_jvm_lint use required_aspect_providers = [[JvmAndroidSdkInfo]] instead of requires.
  • android/lang.json quality entry (licenses: ["android-sdk-license"], lint/typecheck android_sdk_aspect); schema and dx_families::QualityFiles get licenses; wanted() matches license:<id>.
  • dx_adopt::quality_marks(root) = file extensions + license:<id> per accepted id; used by exec_quality and cold_start_test.
  • select_aspects keeps non-real_ helper aspects; lang_projections gives helpers no shard or conformance subject.
  • Android conformance lint subject runs android_sdk_aspect before real_jvm_lint.
  • Tests: android_sdk_classpath_tests (javac/kotlinc get android.jar only with the SDK aspect first), plan ordering test, license-mark tests.

Tests

bazel test --build_tests_only --test_tag_filters=-consumer,-nested //cli/families/... //cli/plan/... //cli/adopt/... //cli/exec_quality/... //core/modules/... //android/tests/... //core/quality/testdata/... //java/tests/... //core/quality:jvm_classpath_policy_test: 919 pass, 4 fail in files this PR does not touch (//core/modules:consumer_deps_test lock/bazel_dep drift on the base branch; matrix_text_typos_fail, matrix_rust_typos_fail, matrix_sql_lint_parse_error golden mismatches from typos/sqlfluff output).

Not run locally: nested-Bazel and *_consumer_test targets (incl. cold_start_test); CI runs them.

Remaining by design: rules_android+ stays in UPSTREAM_REGISTERED and java.txt until #14357.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 21, 2026
@TrapsterDK
TrapsterDK force-pushed the issue-14418-android-sdk-aspect branch from 339570d to d899c57 Compare November 21, 2026 09:33
TrapsterDK and others added 4 commits November 21, 2026 10:33
…#14402)

jvm.bzl and jvm_check.bzl no longer load @rules_scala. scala/lang.json now
names scala/private/quality:scala.bzl, which owns scalac, scalafix and
scalafmt, the real_scala_{format,lint,typecheck} shards and their probes,
and scalac_check_aspect. cold_start_test gains a java case with scala in
FOREIGN that also analyzes the dx check aspects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
…alysis (part of #14402)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
…14418)

android_sdk_aspect lives in android/private/quality/android_sdk.bzl with the
@rules_android load. jvm_check_aspect and real_jvm_lint read JvmAndroidSdkInfo
from java/private/quality/jvm_info.bzl through required_aspect_providers, so
the JVM quality files no longer load @rules_android.

android/lang.json gets a quality entry selected by the accepted
android-sdk-license (license:<id> marks from dx_adopt::quality_marks), and
select_aspects keeps helper aspects that are not real_ shards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
@TrapsterDK
TrapsterDK force-pushed the issue-14418-android-sdk-aspect branch from d899c57 to a64ce8d Compare November 21, 2026 09:33
@TrapsterDK
TrapsterDK changed the base branch from issue-14402-scala-quality to main November 21, 2026 09:34
@TrapsterDK
TrapsterDK merged commit 976c47a into main Nov 21, 2026
1 check failed
@TrapsterDK
TrapsterDK deleted the issue-14418-android-sdk-aspect branch November 21, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java: JVM quality aspects load @rules_android, so Java consumers need the rules_android archive

1 participant