0

I'm trying to add in testing to my Android app via RoboSpock. I'm trying to model my project after their example. So I have the following structure to my project:

src/
    android/
          src/org/myorg/myproject
          build.gradle
    robospock/
          src/
          build.gradle
    gradlew
    build.gradle
    settings.gradle

Here's my settings.gradle:

include ':android', ':robospock'

project(':android').name = 'estanteApp'
project(':robospock').name = 'estanteApp-robospock-tests'

If I run gradle, I get this error:

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/bradrhoads/Documents/src/estante/src/build.gradle' line: 1

  • What went wrong: A problem occurred evaluating root project 'src'.

    Could not find method include() for arguments [android, robospock] on root project 'src'.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

What am I doing wrong? Thanks!

Opal
  • 81,889
  • 28
  • 189
  • 210
Brad Rhoads
  • 1,828
  • 3
  • 29
  • 52
  • Could someone please add robospock as a tag. Not sure if my problem is just a generic Gradle issue or RoboSpock related. But I expect RoboSpock will get used a lot. While many questions will be related to Gradle, Spock and Robolectric, some may be specific to RoboSpock. – Brad Rhoads May 30 '14 at 21:36
  • 1
    According to the error message, the error occurs in `'/Users/bradrhoads/Documents/src/estante/src/build.gradle' line: 1`. Did you perhaps mix up `build.gradle` and `settings.gradle` or something? – Peter Niederwieser May 30 '14 at 21:38
  • Dang! That's exactly what happened. I ended up pasting the setting.gradle code into the build.gradle file. If you put this in and answer, I'll accept it. Thanks! – Brad Rhoads May 30 '14 at 21:48
  • Added `robospock` tag. – Opal May 31 '14 at 08:05

0 Answers0