0

I am using the Gradle J2ObjC plugin to translate Java code in the pure-Java modules of my project to Objective-C. I have a need for the generated podspec file in the build/j2objcOutputs folder of one of my Java modules to contain a junit entry in the spec.libraries list. Currently it is defined as follows:

spec.libraries = 'ObjC', 'guava', 'javax_inject', 'jre_emul', 'jsr305', 'z', 'icucore'

Is there something that I can add to the build.gradle file of my Java module to make this possible?

Adil Hussain
  • 30,049
  • 21
  • 112
  • 147

1 Answers1

0

I have been unable to figure out how to do this with the J2Objc Gradle plugin and have had to resort to putting the following in the "Other linker flags" in Xcode for my tests target:

$(inherited)
-l"junit"

I'm marking this as the solution until someone can suggest otherwise.

Adil Hussain
  • 30,049
  • 21
  • 112
  • 147