Open adil-hussain-84 opened 8 years ago
I've updated the description of the issue above as I've discovered the root of the problem... but still don't know how to solve the issue so I haven't closed it yet. The best I've come up with right now is to add the following in the "Other linker flags" in Xcode for my tests target:
$(inherited)
-l"junit"
Would be great if I could do this via the build.gradle
file instead of hard-coding in my Xcode project.
I have a
TestContracts
Java module in my project that has classes which have JUnit / Hamcrest assertions. I'd like to translate these classes and use them in the tests target of myiOS
module. Thebuild.gradle
file of myTestContracts
module is as follows:The Java to Objective-C translation step of the Gradle build completes but the
:iOS:xcodebuild
step fails with a linking error. It can't make sense of the JUnit assertions. The problem I've discovered is that the'junit'
library is missing from thepodspec
files created in theTestContracts/build/j2objcOutputs
folder.So question is: is it possible specify the JUnit and Hamcrest dependencies in a way that they're included in the generated
podspec
file? And, if so, how?