Build failing with `could not find gradle` error

gradle

#1

Based on the latest buildlog for Privacy Browser, it appears that the build server is missing the Android Gradle plugin 3.0.0.

Could not find com.android.tools.build:gradle:3.0.0.

What is the process for getting this added?

PS. It is probably obvious to everyone, but there is a distinction between the Android Gradle plugin and Gradle itself.


#2

This has nothing to do with buildserver. Android Gradle plugin 3.0.0 is distributed via Google Maven, so apps should add it into their build.gradle, see: https://developer.android.com/studio/build/dependencies.html#google-maven

Android Studio silently fixes this up, so many developers didn’t notice this change.


#3

If you will look at the source code for the Privacy Browser 2.7.1 release, you will see that I have already followed the instructions you link to, although for the 2.8 release I am going to switch back to the older syntax because Android Studio complained it couldn’t find the 3.0.1 Gradle plugin with the google() syntax and recommended:

maven {
    url 'https://maven.google.com'
}

Also, see this feature request that was supposed to add support for this, but apparently hasn’t in all cases.


#4

The documentation I linked to previously is incomplete. This page has better instructions and shows that google() must be listed in both the buildscript and allprojects sections of the build.gradle file:

https://developer.android.com/studio/build/index.html#top-level


#5