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 8494179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:13:43+00:00 2026-06-10T23:13:43+00:00

In my settings.gradle file, I originally had this which works include ‘server’, ‘webapp’ I

  • 0

In my settings.gradle file, I originally had this which works

include 'server', 'webapp'

I modify it to this and it breaks

include 'server', 'webapp'

modifyProjectNames(rootProject, "sdi-")

def modifyProjectNames(project, prefix) {
  project.children.each {
        it.name = prefix + it.name
  }
}

It says “project with path ‘:webapp’ could not be found in root project ‘SDI'” so I modify my file to this instead

include 'master', 'sdi-webapp'

modifyProjectNames(rootProject, "sdi-")

def modifyProjectNames(project, prefix) {
  project.children.each {
        it.name = prefix + it.name
  }
}

I get the same exact failure yet I have no :webapp in settings.gradle so it must be my main gradle build file so I rename that project now as well to :sdi-webapp so now the error changes slightly to

Project with path ':sdi-webapp' could not be found in root project 'SDI'.

I have a project structure like so

SDI
– server
– webapp

and I want all the project names to be sdi-server and sdi-webapp, etc. etc. BUT I want the directories to be called

/SDI/server instead of /SDI/sdiserver
/SDI/webapp instead of /SDI/sdiwebapp

ie. no sense in being redundant there.

EDIT

I tried the first answer on another project like so

include 'master', 'toneserver','webserver'

modifyProjectNames(rootProject, "sdi-")

def modifyProjectNames(project, prefix) {
  project.children.each {
        it.name = prefix + it.name
  }
}

rootProject.children.each {proj ->
  proj.projectDir = file(proj.name - "sdi-")
}

It simply failed with

Project with path ':toneserver' could not be found in root project 'stserver'

It kind of works if you go through your build.gradle file and modify EVERY reference to also have the prefix which kind of defeats that programming rule of trying not to repeat yourself 🙁 🙁 so if I ever want to modify the prefix, I have to do an ugly find and replace :(…ick. but it does work.

thanks,
Dean

  • 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-06-10T23:13:44+00:00Added an answer on June 10, 2026 at 11:13 pm

    as a workaround, you ca try to use the projectnames you prefere (SDI-…) in your include calls and change the projectDir of each subproject:

    rootproject.children.each{proj->
        proj.projectDir = file(proj.name - "SDI-")
    }
    

    cheers,
    rene

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

Sidebar

Related Questions

When applying a multi-project Gradle structure to our project, my settings.gradle looks like this:
I have a jar dependency for the build.gradle file itself. I'm using this definition:
In Gradle you need to define subprojects to be built in a 'settings.gradle' file.
With settings, I've always had some const variable in a file somewhere. Is it
Settings.settings generates Settings.Designer.cs which presumably generates app.config which then is copied to output directory
Settings table contains always one row with lot of long-caption columns. Opening this in
jeditable settings $('.editable').editable('includes/notes/save.php', { loadurl : 'includes/notes/load.php?id=' + $(this).find(div).prop(id),//undefined child ID type : 'text',
In settings.py I have setup a way to log my messages like this: logging.basicConfig(
Libspotify stores settings in a file called settings. Now, it seems that it discards
I've recently started using Gradle and replacing my existing Maven-based projects. I have had

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.