0

I am currently developing an Android app (= multi module gradle project).

I am trying to introduce ArchUnit, but I have problems accessing the test sourceset of all other modules....

As I am using kotlin and want to use kotlin reflection (= finding out if some classes are indeed internal) it would be good to have those classes on the classpath as well....

I started using ClassFileImporter().importPackages("my.test")

Note: I am using gradle Kotlin DSL

Florian Reisinger
  • 2,638
  • 4
  • 23
  • 34
  • This might help: https://stackoverflow.com/questions/5644011/multi-project-test-dependencies-with-gradle – aSemy Aug 05 '22 at 09:16

1 Answers1

1

The best thing I could come up with is the following:

I import the files via a path:

ClassFileImporter().importPath(Paths.get(".."))

(NOTE: .. references the root project, I placed the test in the test sourceset of my Android "app")

Florian Reisinger
  • 2,638
  • 4
  • 23
  • 34