J2ObjC support for multiplatform projects

Description of the feature request

Add step that allows installation of the J2ObjC tool

Use case / for what or how I would use it

I am working on a multi-platform project that shares code between Android and iOS using the J2ObjC tool. The project contain 3 modules:

  • library : shared code written in Java
  • android-app : Android application project
  • ios-app : iOS application project

The iOS application project uses the J2ObjC to translate the Java source in the library project. In order to do this, it is neccesary to instal the j2objc framework files on the build machine and specify the install location (i.e. Enviornment variable J2OBJC_HOME specifying the path).

The required step would be very similar to the “install missing android components” step.

The challenge:

  • Since the J2objC framework files are quite large this cannot be part of the application project.
  • It is currently distributed as one or more zip files that should be extracted to the desired location
  • The distribution artefacts are available as github release assets

Considering the above it would be great to have a Installer step for J2OBJC that installs the sdk and framework on the build machine. The install location should also be exposed as an enviornment variable similar to JAVA_HOME or ANDROID_SDK_HOME etc.

Some useful information

  • https://j2objc.org has a big documentation section on how to use it with different systems.
  • The j2objc compiler has the same core flags as javac: -d, -sourcepath, -classpath, -source, etc. So in theory, j2objc should plug into the system in a similar way as javac does.
  • There are some simple example projects in the J2ObjC Github repo. https://github.com/google/j2objc/tree/master/examples