0

Is it currently possible to import a dependencies from a maven repo during the build of Moqui? Below is my build.gradle in my component but I don't see anything in the logs to suggest it downloads anything?

Thanks for any help!

Sam

apply plugin: 'groovy'

sourceCompatibility = '1.7'

def moquiDir = file(projectDir.absolutePath + '/../../..')
def frameworkDir = file(moquiDir.absolutePath + '/framework')

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'com.braintreepayments.gateway', name: 'braintree-java', version: '2.45.0'
}
Sam Hamilton
  • 131
  • 2
  • 3
  • 10
  • Your "compile" dependency looks correctly declared. Is the compile stage successful? – Jolta Jun 22 '15 at 13:10
  • @Jolta yes it shows "BUILD SUCCESSFUL" but I have suspicion that what I am trying to do is not supported in Moqui yet and I should manually import the files. – Sam Hamilton Jun 22 '15 at 14:08
  • Moqui doesn't do anything special with Gradle. It does use local directory repositories by default, but there isn't anything that would prevent using the mavenCentral repository along with the local ones or even instead of them. – David E. Jones Jun 23 '15 at 05:55

1 Answers1

0

It was a very basic problem, I needed to add the directory to settings.gradle and things work.

include 'framework', 'runtime/base-component/example', 'runtime/mantle/mantle-usl', 'runtime/component/braintree'

I had thought that like screens, entities etc in components it would pick up my gradle script automatically.

Sam Hamilton
  • 131
  • 2
  • 3
  • 10
  • In general Moqui automatically (actually through configuration of component directories in the Moqui Conf XML file) picks up components and resources in them, but only runtime resources such as entities, services, screens, JAR files in lib, classes/resources in classes, etc. The build process is entirely outside Moqui and you can use Gradle or other build tools, but Moqui has no special hooks in those. This might be possible with a Groovy/Gradle script, but I haven't tried it... it would have to look for build.gradle files or something. – David E. Jones Jun 23 '15 at 15:35