1

I have project with numerous of submodules located in different directories:

enter image description here

How you can see, the module name of IDEA (in []) differs from directory root. I've tried to modify it though Project Settings, but after gradle sync it returns to initial state.

Is it possible to configure Gradle to set module name according with directory name?

Nick Aden
  • 13
  • 2

1 Answers1

1

IDE takes the module name from the Gradle configuration, which is by default a project directory name. If you want to change it you can do so by adding the following in the settings.gradle file:

rootProject.name = 'newProjectName'

See also the Naming recommendations from Gradle.

Andrey
  • 15,144
  • 25
  • 91
  • 187
  • 1
    Thanks, but what if I want to set module name as directory name? (`core` instead of `air-ndc-directconnect-service.core`) – Nick Aden Aug 26 '21 at 13:02