I have a project which has a build.gradle file checked in, and is pointed 
to a hardcoded gradle plugin version 
<https://github.com/couchbaselabs/ToDoLite-Android/blob/master/build.gradle#L8>
.

Additionally, it is using the gradle wrapper, and that is pointed to a 
hardcoded 
distributionUrl for gradle 
<https://github.com/couchbaselabs/ToDoLite-Android/blob/master/gradle/wrapper/gradle-wrapper.properties#L6>
.

The problem is that if these aren't kept up to date, then as new versions 
of Android Studio come out, anyone who clones and imports the project, runs 
into errors like this 
<https://groups.google.com/forum/#!topic/mobile-couchbase/YJcnRSAJRYA>:

I got a dialog stating that Version 0.13.3 of the Android Gradle Plugin 
(which is what I have) requires Gradle 2.1 or newer, and offering to 
upgrade the version (in the project, I later figured out.) If I do that, I 
get a build failure:

"Gradle version 1.10 is required. Current version is 2.1. If using the 
gradle wrapper, try editing the distributionUrl…"


So is it a good idea to distribute a build.gradle with a project and tell 
people to import it, or is there a better approach?  I chose this because 
it's normally very easy for the user.  

If that's the recommended approach, is the only thing I can do is to make 
sure that the build.gradle and distributionUrl always match the latest 
released Android Studio?  Are there any tools / approaches that make this 
easier?  I'm maintaining multiple gradle based projects, so updating each 
one is kind of cumbersome.


-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to