Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To utilize repositories in the build.gradle of your android module instead of the build.gradle belonging to the top-level (project), you can add the necessary repository dependencies in the build.gradle file of the specific android module where you want to use them.

For example, you can add the following code in the build.gradle file of your android module:

repositories {
    maven { url 'https://maven.google.com' }
    jcenter()
    // any other repositories you want to add
}

This will add the specified repositories for the module only and not affect the top-level build.gradle file. Note that if your module is dependent on other modules or libraries, you may need to add the repositories in the top-level build.gradle file as well, to ensure that all necessary dependencies can be resolved.