sbt-aspectj icon indicating copy to clipboard operation
sbt-aspectj copied to clipboard

Apply aspect for test classes with sbt-aspectj

Open theSemenov opened this issue 4 years ago • 0 comments

How to apply aspects for unit-test using sbt-aspectj. It's only worked for my project main classes and not worked for test classes

My config in build.sbt

aspectjSettings
aspectjInputs in Aspectj += (aspectjCompiledClasses in Aspectj).value

aspectjCompileOnly in Aspectj := true

products in Compile := (products in Aspectj).value

products in Runtime := (products in Compile).value

test classes located under {proj}/tests folder

theSemenov avatar Apr 24 '20 16:04 theSemenov