Skip to content

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

Merged
RBusarow merged 1 commit intomainfrom
rick/compileOnly-annotations
Jan 23, 2024
Merged

don't leak Anvil's annotation artifacts to the target project's compile classpath#822
RBusarow merged 1 commit intomainfrom
rick/compileOnly-annotations

Conversation

@RBusarow
Copy link
Contributor

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
Contributor

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
Contributor 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
Contributor

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
Contributor 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
@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