Subproject does not know dependencies in root project

buildship

(tom) #1

when running ‘./gradlew core:test’ in the command line all works fine

When i try to run the tests of a subproject in eclipse i get :

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Volumes/work/project/core/build.gradle’ line: 4

  • What went wrong:
    A problem occurred evaluating root project ‘core’.

Plugin with id ‘org.akhikhl.gretty’ not found.

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

It looks like its not picking up the repository info of the root project. Should that also be added to the sub projects?

the line it fails on :
apply plugin: ‘org.akhikhl.gretty’


(Stefan Oehme) #2

Hi Tom,

thank you for the report. Could you share a reproducible example project?

Cheers,
Stefan


(tom) #3

eclipse.zip (96.3 KB)

I stripped down the project but the same problem occurs.
So running the tests for the core project only does not work with buildship.
Running the tests over the root project works.
Running in the command line ‘./gradlew clean core:test’ also works


(Stefan Oehme) #4

Your ‘core’ project contains a settings.gradle, which it should not. There should only be one settings.gradle in the root project, where you reference all sub projects of your build. See the documentation on multi-project builds.


(tom) #5

Ok, thank you. That solved it.