-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
The R classes of aar_import targets are not provided in direct dependencies's classpaths #8109
Comments
Repro: BUILD: android_library(
name = "my_lib",
srcs = ["Main.java"],
custom_package = "com.example.bazel",
deps = [
artifact("com.android.support:design"),
],
manifest = "LibManifest.xml",
)
android_binary(
name = "my_app",
custom_package = "com.example.bazel",
manifest = "AndroidManifest.xml",
deps = [
":my_lib",
],
) Main.java package com.example.bazel;
class Main {
public static void main(String[] args) {
// does not compile
// int MyInt = android.support.design.R.string.abc_action_mode_done;
// compiles
int MyInt = R.string.abc_action_mode_done;
}
} Error:
|
The resources are correctly processed into a
but this jar not added to the classpaths of direct dependencies. |
Thanks for reproing this - you beat me to the repro case. This is exactly our issue, and the proposed fix in gerrit is correct, and works for Square internally. Thanks! |
…s files on the classpath.
This will be in 0.26. |
…cies of aar_import targets Fixes #8109 RELNOTES: Added support for compiling against fully qualified R classes from aar_import dependencies. PiperOrigin-RevId: 244946625
No chance of it being cherry picked into 0.25? It's strictly a bug fix. |
Cherry-picks are only for newly introduced regressions in the release. |
@jin - Ack. |
…s files on the classpath.
…s files on the classpath.
…s files on the classpath.
…ncies of aar_import targets Fixes bazelbuild/bazel#8109 RELNOTES: Added support for compiling against fully qualified R classes from aar_import dependencies. PiperOrigin-RevId: 244946625
As title.
The text was updated successfully, but these errors were encountered: