Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6182891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:16:29+00:00 2026-05-24T01:16:29+00:00

I am trying to set up a gradle build script for a multiproject grails

  • 0

I am trying to set up a gradle build script for a multiproject grails application.
I have used the grails-gradle plugin and got it up and running to create a new application.

However, I have some problems when I want to convert an existing grails multiproject application to use gradle.

I have declared all subprojects in my settings.gradle file as follows:

include 'core',

        //Plugins
        'plugin1',
        'plugin2'

and for each subproject set up its dependencies in their own build.gradle files. e.g.
plugin1 is dependent on plugin2 so I have declared the following in plugin1’s build.gradle file:

dependencies {
  compile project(':plugin2')
}

However, I got the following error when I try to run the gradle test command:

UNRESOLVED DEPENDENCIES

What went wrong:
Execution failed for task ‘:plugin1:test’.
Cause: Could not resolve all dependencies for configuration ‘:plugin1:runtime’:
– unresolved dependency: {}#plugin2;1.5-SNAPSHOT: configuration not found in {}#plugin2;1.5-SNAPSHOT: ‘default’. It was required from {}#plugin1;1.5-SNAPSHOT compile

My question is then, How do I set up the subproject dependencies in gradle?

I have declared them in each subprojects BuildConfig.groovy as inline dependencies, do I have to declare them in gradle as well?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:16:30+00:00Added an answer on May 24, 2026 at 1:16 am

    I answer my own question If anyone else have the same issue.

    I wanted to set the build order for a multiproject grails application (A main application that was dependent on several grails-plugins located in separate folders).

    I ended up by declaring a dependsOn() in each subproject buildfile.

    Example:
    My main application is dependent on pluginA and pluginB. PluginB is dependent on PluginC

    In my root build.gradle I declared:

    dependsOnChildren()
    

    and in my root settings.gradle I declared:

    include "pluginA","pluginB","pluginC"
    

    In pluginB:s build.gradle file I declared

    dependsOn(":pluginC")
    

    That solved my issue. However it also introduced another issue that the the tests for each plugin were compiled but not executed.

    I found a solution for this @ GRAILS-7296

    I created a _Events.groovy file in the scripts folder for each subproject and included:

    // Override to workaround GRAILS-7296
    org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport.metaClass.getSourceDir = { ->
        new File(delegate.buildBinding.grailsSettings.testSourceDir, delegate.relativeSourcePath)
    }
    

    This solved all my problems and I have now a multiproject-grails application that uses Gradle for the build.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to set up a script to send commands to a remote client on
Trying to set-up a git server on my local dev machine and have been
Trying to set this label to red I've got the following class: .redErrorText {
Trying to set up the svn commit with trac using this script. It is
Trying to set up a new spring project and im having this issue where
Trying to set up one-way SSL with Weblogic 11g and running into an issue.
Trying to set the created_at date manually: entry = Entry.new entry.text = tweet['text'] entry.source
Trying to set up a menu so that I have border-left on each menu
Trying to set this textbox <%= Html.TextBoxFor(m => m.IndicationCalculatorNewGroupName, new {propertyName = IndicationCalculatorNewGroupName, onchange
Im trying set the single table inheritance model type in a form. So i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.