You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/11/13 15:23:49 UTC

[GitHub] dland512 opened a new issue #548: How to use build-extras.gradle

dland512 opened a new issue #548: How to use build-extras.gradle
URL: https://github.com/apache/cordova-android/issues/548
 
 
   Is there any way to change the order of the plugin repositories listed in `build.gradle`? Based on[ the docs](https://cordova.apache.org/docs/en/latest/guide/platforms/android/#extending-buildgradle), I see that modifications to `build.gradle` is supported through the `build-extras.gradle` file.
   
   This is what cordova spits out by default:
   ```
   allprojects {
       repositories {
           jcenter()
           maven {
               url "https://maven.google.com"
           }
       }
   }
   ```
   And I need to change it to reverse the oder of the repositories like this:
   ```
   allprojects {
       repositories {
           maven {
               url "https://maven.google.com"
           }
           jcenter()
       }
   }
   ```
   Since `build.gradle` is an auto generated file, I don't want to edit it by handle (it's also not currently in source control).
   
    I tried creating a `build-extras.gradle` file in the same directory as `build.gradle` with the following contents:
   ```
   allprojects {
       repositories {
           maven {
               url "https://maven.google.com"
           }
           jcenter()
       }
   }
   ```
   but it didn't work. There doesn't seem to be a lot of documentation on the `build-extras.gradle` file regarding the syntax and what is allowed in it. Do you just put the part of `build.gradle` that you want to replace?
   
   How does it work?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org