Skip to content
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

Fix java_plugins to work with Android rules #407

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

jongerrish
Copy link
Contributor

@jongerrish jongerrish commented Nov 23, 2020

java_plugin rules used from Android rules fail with the following error:-

ERROR: /Users/jgerrish/indiekid/rules_kotlin/examples/android/app/BUILD.bazel:29:15: in deps attribute of android_binary rule //app:app3: Dependencies on .jar artifacts are not allowed in Android binaries, please use a java_import to depend on kotlin_rules_maven/v1/https/maven-central.storage.googleapis.com/repos/central/data/com/google/auto/value/auto-value/1.6.5/auto-value-1.6.5.jar. If this is an implicit dependency then the rule that introduces it will need to be fixed to account for it correctly.. Since this rule was created by the macro 'android_binary', the error might have been caused by the macro implementation

This is due to including plugins as compile dependencies.

Remove plugins from compile dependencies and add a test to ensure annotation processed code is available when using Android rules.

Similar to #388

@jongerrish jongerrish force-pushed the java_plugins_with_android branch from 0a05e28 to 02a57b6 Compare November 23, 2020 16:42
@restingbull restingbull merged commit 408a1ed into bazelbuild:master Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants