I have the suggested SharedCode, Android and iOS project structure using the Gradle J2ObjC plugin... where the classes etc in SharedCode are accessed by the main application code of the Android and iOS modules. This works fine.
What I'd like to do is add a fourth module named SharedCodeTestContracts which has a dependency on SharedCode and whose classes etc are to be accessed by the test code of the Android and iOS modules rather than the main application code, as follows:
The question: Is something like this possible with the J2ObjC Gradle plugin? Can I have two modules that are translated by J2ObjC... one which links to the iOS main application target and the other which contains JUnit tests and links to the iOS test target only?
A bit of context about why: Occasionally I define an interface in the SharedCode module which is to be implemented separately in the Android and iOS modules. To avoid writing the same tests twice (once on each platform) I'd like to have the tests in a shared place which can be accessed by each of the modules.

Thanks to @advayDev1 for pointing me in the right direction.
The solution is to declare the
build.gradlefile of theSharedCodemodule as follows:And to declare the
build.gradlefile of theTestContractsmodule as follows:Based on the above, on building your project you should expect the contents of your
Podfileto be the following:There is a bug in the J2ObjC Gradle plugin which doesn't quite produce the expected
Podfileoutput but see here for more on that.