diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-10 01:06:58 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-10 01:06:58 +0000 |
commit | 91f5a4960f3c73a5e59b27bcc2f8ee4c31b08fc8 (patch) | |
tree | a58049c9682d6fd38e8408479340bf3911b87515 /rules/dex_desugar_aspect.bzl | |
parent | bc67c32f96ccf8d0c503a88cbbf7b7ae91559be3 (diff) | |
parent | 9e965d6fece27a77de5377433c2f7e6999b8cc0b (diff) | |
download | bazelbuild-rules_android-android14-qpr2-release.tar.gz |
Snap for 10923648 from 9e965d6fece27a77de5377433c2f7e6999b8cc0b to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: Ic28eeddca3097c154d1283e0670dc1c497bfc08b
Diffstat (limited to 'rules/dex_desugar_aspect.bzl')
-rw-r--r-- | rules/dex_desugar_aspect.bzl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rules/dex_desugar_aspect.bzl b/rules/dex_desugar_aspect.bzl index 9d692d3..066ad1a 100644 --- a/rules/dex_desugar_aspect.bzl +++ b/rules/dex_desugar_aspect.bzl @@ -14,7 +14,7 @@ """Aspect that transitively build .dex archives and desugar jars.""" -load(":utils.bzl", _utils = "utils") +load(":utils.bzl", _get_android_sdk = "get_android_sdk", _utils = "utils") load(":dex.bzl", _dex = "dex") load(":desugar.bzl", _desugar = "desugar") load(":providers.bzl", "StarlarkAndroidDexInfo") @@ -193,8 +193,10 @@ def _get_boot_classpath(target, ctx): compilation_info = target[JavaInfo].compilation_info if compilation_info and compilation_info.boot_classpath: return compilation_info.boot_classpath - if ctx.attr._android_sdk and ctx.attr._android_sdk[AndroidSdkInfo].android_jar: - return [ctx.attr._android_sdk[AndroidSdkInfo].android_jar] + + android_jar = _get_android_sdk(ctx).android_jar + if android_jar: + return [android_jar] # This shouldn't ever be reached, but if it is, we should be clear about the error. fail("No compilation info or android jar!") @@ -249,5 +251,6 @@ dex_desugar_aspect = aspect( _attrs.ANDROID_SDK, ), fragments = ["android"], + toolchains = ["//toolchains/android_sdk:toolchain_type"], required_aspect_providers = [[JavaInfo]], ) |