How to import classes from the same project?


(sergey.morenets) #1

Hi

I have a project called dao. I tried to use classes from the project in its build script.

buildscript {

repositories { mavenCentral() }

dependencies { classpath ‘org.test:dao:0.1.0-RELEASE’ } }

or

dependencies { project(’:dao’) }

But it didn’t work. In first case I get error message ‘Module version org.test:dao:0.1.0-RELEASE, configuration ‘classpath’ declares a dependency on configuration ‘default’ which is not declared in the module descriptor for org.test:dao:0.1.0-RELEASE’.

In the second case my import statement fails ‘Unable to resolve class …’

Please advise.