0

My build.gradle file

ext {
    mainClassName = "org.robovm.bindings.admob.sample.Sample"
}

eclipse.project {
    name = "admob-ios"
    natures 'org.robovm.eclipse.RoboVMNature'
}

When I try to import this project (https://github.com/BlueRiverInteractive/robovm-ios-bindings/tree/master/admob) into eclipse (when i click build model)

I get this

FAILURE: Build failed with an exception.

    * Where:
    Build file '/Users/Vlad/Downloads/folder/admob/build.gradle' line: 5

    * What went wrong:
    A problem occurred evaluating root project 'admob'.
    > Could not find property 'eclipse' on root project 'admob'.

What can I do?

user1452079
  • 118
  • 10
  • I think `apply plugin: 'eclipse'` is missing from the `build.gradle` file which is why the `eclipse` property is not present for the project. – Invisible Arrow Dec 24 '14 at 12:44

1 Answers1

0

You have to apply some plugins. For the eclipse task the plugin eclipse is required. Apply it by adding apply plugin: 'eclipse' to the head of your build.gradle. Futhermore you need a java or other plugin to get the eclipse plugin working properly.

Furthermore I see a mainClassName defined as extra property. Do you instead intend to start the application from command line using gradle run? If yes, additionally apply the applicaton plugin by adding apply plugin:'application' (see also http://www.gradle.org/docs/current/userguide/application_plugin.html). This also includes adding the java plugin. If you intended to just have a global variable called mainClassName you need to apply the java plugin yourself (for a working eclipse plugin).

Andreas Schmid
  • 1,195
  • 8
  • 13