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

don't leak Anvil's annotation artifacts to the target project's compile classpath #822

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

RBusarow
Copy link
Collaborator

No description provided.

@RBusarow RBusarow force-pushed the rick/compileOnly-annotations branch 2 times, most recently from 50e232e to 0d3cc7d Compare January 16, 2024 22:04
@RBusarow RBusarow requested a review from JoelWilcox January 18, 2024 00:06
@RBusarow RBusarow force-pushed the rick/compileOnly-annotations branch from 0d3cc7d to 81cb9f4 Compare January 18, 2024 00:17
* For this test, we're testing what dependencies Anvil adds to the target project's own
* `runtimeClasspath` and `compileClasspath` configurations. Specifically, it adds the Anvil
* annotations dependency -- but is it added correctly as a `compileOnly` dependency,
* or is it being added as `implementation` or something else?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is great 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😄 I think the coffee had just kicked in.

* or is it being added as `implementation` or something else?
*/
@TestFactory
fun `annotations aren't in the runtime classpath`() = listOf(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Since we also care about verifying that the annotations are included in the compile classpath, something like annotations are only included in the compile classpath might be better for encoding the expectations

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an excellent point. Thanks!

@RBusarow RBusarow force-pushed the rick/compileOnly-annotations branch from 81cb9f4 to e6a8d35 Compare January 23, 2024 02:03
@RBusarow RBusarow enabled auto-merge January 23, 2024 02:06
@RBusarow RBusarow merged commit a8e74b8 into main Jan 23, 2024
18 checks passed
@RBusarow RBusarow deleted the rick/compileOnly-annotations branch January 23, 2024 02:19
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.

3 participants