How to add linker flags

I want to link my own compiled .a file. It contains some util code for working with opengl.
How can I do it?
Now I use hack task to patch xcode project:

task patchxcode << {
  java.nio.file.Path path = Paths.get("$projectDir/build").toAbsolutePath()
  Files.walkFileTree(path, new java.nio.file.FileVisitor<java.nio.file.Path>() {
    @Override
    FileVisitResult preVisitDirectory(java.nio.file.Path dir, BasicFileAttributes attrs) throws IOException {
      return FileVisitResult.CONTINUE
    }

    @Override
    FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException {
      if (file.endsWith("build.xcconfig")) {
        def jniTask = tasks.getByPath(":scene-graph-ios:buildJni");
        appendToLineInFile(file, "MOE_CUSTOM_OTHER_LDFLAGS", " -force_load  ${jniTask.ext.outputPath} -framework OpenGLES")
      }
      return FileVisitResult.CONTINUE
    }

    @Override
    FileVisitResult visitFileFailed(java.nio.file.Path file, IOException exc) throws IOException {
      return FileVisitResult.CONTINUE
    }

    @Override
    FileVisitResult postVisitDirectory(java.nio.file.Path dir, IOException exc) throws IOException {
      return FileVisitResult.CONTINUE
    }
  })
}

I think it’s tricky and fragile.

Dear zufarfakhurtdinov,

Currently this is supported by using a project with non-generated Xcode project and modifying the Xcode project. You can create such a project by creating a new MOE project/module in Android Studio and selecting the “Keep Xcode” option.
In this way most of Xcode’s features are configurable.

Note: in this configuration most of the options in build.gradle’s moe.xcode scope are ignored.