I’m trying to add unit test for iOS, and the built application only contains codes from src/test but not src/main, so I got NoClassDefFoundError when I try to access classes written in src/main/java.
I face the same problem even generate an new simple moe application. The project was generated with the latest version of the IntelliJ MOE plugin in IntelliJ.
Thank you for bringing this to our attention.
Hi @liliomk ,
Is there any solution to this problem? Thanks.
This might work as a workaround to this issue:
inJars = inJars + project.tasks.compileJava.destinationDir
Thanks for your code. That’s almost work except it doesn’t include the dependencies from main module.
inJars = inJars + project.tasks.compileJava.destinationDir + configurations.runtime
to include all dependencies and it works!
@liliomk And I’m wondering if it’s a good idea to add an option to shutdown the simulator after the test automatically because we are trying to run the unit test on jenkins.
we are not planning on such feature, but you can do it via the simctl command-line utility:
xcrun simctl --help