A feature of the CloudTurbine Gradle-based build system is that the software can be built either from the command line or from within an Integrated Development Environment (IDE).  Building from the command line can be simple and convenient, but IDEs offer many built-in features to assist with editing and code development and therefore it is also useful to integrate Gradle build tasks in the IDE.  Since Google’s termination of Android project support in Eclipse as of the end of 2015 (ttps://www.infoq.com/news/2015/06/google-android-eclipse), our CloudTurbine development is split between two IDEs: Java applications (projects under the CloudTurbineGradle/CloudTurbine folder) are developed in Eclipse and Android applications (projects under the CloudTurbineGradle/CloudTurbineAndroid folder) are developed in Android Studio.

Importing Java projects into Eclipse

We are using the Eclipse Buildship plug-ins (https://projects.eclipse.org/projects/tools.buildship) to import CloudTurbine Java projects into Eclipse. Following the instructions at http://www.vogella.com/tutorials/EclipseGradle/article.html, it is easy to setup Buildship and import all of the projects under the CloudTurbineGradle/CloudTurbine folder.

Although this does not appear to be a universal issue, after importing the project into Eclipse on our Windows 7 machine, the CTsync project had a number of “Access restriction” errors. In our case, the issue was easily resolved by following the suggestion given at http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar; namely, removing and then adding back the JRE System library as follows:

  1. Bring up the Properties window for the CTsync project
  2. Go to the “Java Build Path”
  3. Click on the “Libraries” tab
  4. Remove the currently listed “JRE System Library”
  5. Click on “Add Library…” and add back the “JRE System Library”

Importing Android projects into Android Studio

The collection of Android applications in CloudTurbineGradle/CloudTurbineAndroid are easily imported into Android Studio.  In the “Welcome to Android Studio” window that pops up when the application launches, click on “Import project (Eclipse ADT, Gradle, etc.)” and then select the “settings.gradle” file located in CloudTurbineGradle/CloudTurbineAndroid. All of the projects should automatically be loaded.