-
Notifications
You must be signed in to change notification settings - Fork 44
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 Starlark implementaiton of process_deploy_jar fails to execute java.create_deploy_jar #212
Comments
Thanks I'm able to reproduce the problem. By the way the error here https://github.com/Bencodes/rules_android/blob/01a45fc62858722f7587de2e59c741380d16009d/examples/basicapp/.bazelrc#L10 ( |
I sent a change out to update rules_java to 7.4.0 |
I think I see what the problem is. There're a few things going on.
In the repro the error is:
and the deps do not include anything from androidx. Indeed the pom file doesn't list androidx in its deps: https://repo1.maven.org/maven2/com/squareup/leakcanary/leakcanary-object-watcher-android-androidx/2.12/leakcanary-object-watcher-android-androidx-2.12.pom Maybe that's not necessary for the android gradle plugin.
The error is not reported by desugar when it desugars the aar_import (or an android_library or java_library for that matter I think) though. Singlejar reads all the metadata and reports the errors there at the android_binary level.
So it seems the fix is to add androidx to those maven deps. A workaround would be to turn off desugar deps checking (though run the risk of having problems from neverlinked libraries), but unlinke the native rules which have Line 506 in 25e599a
|
One more data point for item 3 above: switching the repro back to the native rules produces the same error, which makes sense (but doesn't answer why this error wasn't happening prior to 51465c2) |
I have a change in review that will wire |
…rimental_check_desugar_deps=false` See #212. PiperOrigin-RevId: 614055815 Change-Id: I8fd2f230e9800322a1c92fc4ca573e1bcc2cfb42
The recently enabled implementation of desugaring fails to compile with types missing from the classpath.
I was able to repro this in the basic sample app https://github.com/bazelbuild/rules_android/compare/main...Bencodes:rules_android:single-jar-failure-repro?expand=1
Example building basic app:
I confirmed that the view models are in fact on the classpath for the singlejar action looking at the subcommands:
And I have confirmed that the jar itself contains the requested classes:
The text was updated successfully, but these errors were encountered: