I'm missing the "Top-Level" project build.gradle script from my project:
I imported it into Android Studio from a very complex Maven/Eclipse project, and it basically made a module ("android") in the top level of the directory, and added all the submodules ("tappurwear", "shared", etc) into that original module's directory.
I know this is a kind of messed up structure, but there's a lot of other build scripts so I can't really just move all the files into a proper separate module.
So now I'm wondering, how do I add a top-level build.gradle script, for the entire project? The usual Android Studio projects I've seen just have one, but it's treating my top-level build script as the "android" module's build script. Can I create a new build.script to be the top-level project script that shares settings with the other modules? Is there a way I can rename the top-level build script that gets used in all other module scripts, in Android Studio or Gradle?
A multi-project build in Gradle consists of one root project, and one or more subprojects. A basic multi-project build contains a root project and a single subproject. This is a structure of a multi-project build that contains a single subproject called app : Example 1. Basic multi-project build.
gradle for one project? Yes. You can have multiple build files in one project.
The module-level build.gradle file, located in each project / module / directory, allows you to configure build settings for the specific module it is located in.
I had the same issue on my multi-module project, this solution worked for me.
build.gradle
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With