Applying rules from an external jar to a multi-module gradle project #1487
Unanswered
exe-atewinkel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to apply some archunit rules from an external jar (preferably packaged as a text-fixtures artifact, or a plain jar if needed) to a gradle project with multiple (sub) projects. I want to configure this in my build-logic, but have not been able to find a working solution.
I've tried the Society Generale ArchUnit Gradle Plugin but this does not work with the Gradle configuration cache since it refers to some Gradle model classes.
I've also tried packaging my ArchUnit tests in an external (test-fixtures) jar and trying to add them to the testRuntimeClasspath but so far I've been unsuccesful. I've also tried adding a JUnit test class that invokes the ArchUnit tests, but this did nothing either.
I'm unsure where exactly I'm going wrong or how to effectively debug my build, as it has been a while since I've done more complex Gradle stuff. Also, I'm unsure if the test-fixtures jar approach is the problem, or loading the ArchUnit tests to the classpath.
Before I keep on struggling, I'd like to ask if anyone has implemented something like this already? Or have some tips on how to do this properly?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions