Import other project classes into Gradle

I am new to Gradlew and I have a classes project that I want to import into another Gradle project.

I have seen examples indicating that first I need to create a settings.gradle file where I put eg

include "projectA"

      

Then in my build.gradleB project I put

...
dependencies {
  compile project(":projectA")
  ...
}

      

However, it didn't work

Is there a way to use classes from other projects?

+3


source to share


1 answer


If you have another jar packed project, you can do:



compile files('/full/path/to/projectA.jar')

      

+1


source







All Articles