Is it possible to build iphone project by Gradle? - iphone

I have an iPhone project and I build it by XCode.
I also have an Android project and build it by Gradle.
Is it possible to build the iPhone project also by Gradle?

I'm not familiar with building iPhone projects, but if you can build the project via commandline commands, then you can also make Gradle call those commands using tasks of type Exec.
As far as I know there is no dedicated iPhone project support in Gradle to date, but you might suggest it on the Gradle forums.

Related

Create a new Gradle Project in Eclipse fails

Creating a new Gradle project fails with,
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-6.3-bin.zip'.
If I click on finish then I see the problem - Could not run phased build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-6.3-bin.zip'.
Could not determine the class-path for class org.gradle.tooling.internal.consumer.connection.InternalPhasedActionAdapter.
This seems to be the following, not yet fixed issue on macOS Big Sur:
Eclipse Buildship issue #1050: Could not run phased build action using Gradle distribution '.../gradle-6.7-bin.zip': Java home is different
You might comment and/or propose a patch there.

Debugging a Gradle 1.12 dependency resolution issue

I am using Gradle 1.12 to build an Android library. The build script works fine and the artifacts are installed to both a Maven local repository and deployed (using an S3 wagon Gradle plugin) to a remote Maven repository. When these artifacts are referenced by a Gradle (1.12) build of a sample app using the Maven local repo, all works fine. When the remote repository is used, a Gradle dependency resolution error is reported [details on the error will be provided later].
To get more information about the problem in order to fix my script or file a bug report, I would like to do some debugging of Gradle 1.12 while the sample app build script runs. Eclipse would seem to have the debugger of choice but configuring Eclipse is the subject of this post.
Following advice on the Gradle forums, it is straightforward to configure Gradle startup options to suspend on startup and await a connection from a client debugger (Eclipse).
Configuring Eclipse to do this is proving difficult. At first glance, it would seem that one needs a Gradle plugin. Spring Source provides a recommended one. But this plugin appears to bury and use Gradle 1.10. Perhaps upgrading this plugin to use 1.12 is easy and an answer that details how to do this would be a great answer.
The critical pieces of the answer I am looking for will enable me to place breakpoints in Gradle classes and step through source code until I either find a bug or figure out what I might be doing incorrectly in my build script.
Alternative approaches, such as using Intellij or Android Studio would be good answers as well if accompanied by details and/or references that make it clear how to enable the Gradle debugging process.
Debugging Gradle works exactly the same as (remotely) debugging any other Java application. No Gradle plugin is needed for this. In a nutshell, you need to start a remote debugging session from an Eclipse project that has Gradle sources. One way to create such a project is to clone the Gradle GitHub repository and run gradlew eclipse.

Is there a way to generate custom BuildConfig.java file when deploying from eclipse?

We have recently converted our app to run under Android Studio and gradle. Our build.gradle file has custom fields generated for different build variants of BuildConfig.java. We still need to run our application in eclipse to run our robolectric tests. Is it possible to have eclipse generate a BaseConfig.java with custom variables other than DEBUG?
Not a solution to your question, but you might want to consider running robolectric from Gradle.
There are many tutorials if you search for it and you probably already set this up.
If you're concerned about debugging robolectric tests you can do so with Android Studio as well. A little bit of classpath hacking may be needed in Android Studio or just use IDEA 14.

Where to put native code for Phonegap 3.0 plugin?

I just upgraded one of my projects to PhoneGap 3.0 and was wondering the proper methodology for developing a custom plugin. I'm following the Echo plugin example from the developer docs. Should the Echo.h and Echo.m files go in the Plugins folder in the project root, or within the Plugins folder for the specific platform being built?
I tried Echo Plugin for iOS and it's working for me. I put Echo.h and Echo.m under platforms/ios/TestProject/Plugins/. Root folder plugins keep plugins your download from command line. It will be auto installed when you make iOS, Android or other platforms.

Libssh2, building library with xcode

I'm using this project to attempt to use the libssh2 library with iOS. The readme does not explain much, however, and I could use some help building the library.
I opened up the example project in xcode, but I am confused about this part of the readme
You can build the libssh2 library with openssl or with libgcrypt!
There are several scripts in the project, do I need to run these as build phases in xcode?
Thanks for your help
You can run the ./build-all.sh with Terminal