Enable building with Gradle using --with-gradle. Configure the
location of Gradle with --with-gradle=/path/to/gradle. For local
developers, this is always the in tree Gradle wrapper, which downloads
and installs the correct Gradle version automatically. In automation,
this will be a version of Gradle fetched from tooltool.
Configure the location to use to download Gradle Maven dependencies
(including the Android-Gradle plugin) by setting
GRADLE_MAVEN_REPOSITORY in your mozconfig. For local developers, this
defaults to the jcenter repository. In automation, this will be an
archived directory fetched from tooltool.
Android-specific Maven dependencies are shipped as "extras" with the
Android SDK, and should be found automatically by the Android-Gradle
plugin.
MozReview-Commit-ID: Hrkn88Vig5H
jcenter() now contains both com.squareup.spoon:spoon-runner:1.1.10 and
org.simpleframework:simple-http:6.0.1 so we can get rid of some
outdated listings.
This is the last Gradle project that isn't in the srcdir. Since base/
doesn't have the correct package prefix directory structure, we still
need to symlink, but we only need one link. This effectively
deprecates |mach gradle-install|.
This should improve the robustness of our Gradle configuration,
ensuring that we always have projects to import. Since
settings.gradle executes very early in the IDE import project
sequence: before Gradle project evaluation time, and thus before any
Gradle task is executed, we should always see a complete project. (It
was possible to see incomplete Gradle configurations if |mach
gradle-install| hadn't been run at just the right time.)
IntelliJ's exclusion mechanism (for Gradle-based projects) is not very
flexible; we get just idea.module.excludeDirs. This patch crawls the
file system to skip what we can.
The sub-project definitions are still in the object directory (and
still installed by |mach gradle-install); over time, we'll migrate
them out.
The Gradle wrapper and {settings,build}.gradle in topsrcdir are
identical to those in mobile/android/gradle. I don't like the
duplication, but I also don't want the burden of keeping the two
configurations identical. We'll move away from the configuration
using mobile/android/gradle as quickly as we can.