From 6ce1e079030b9191d2a9960b3fb266d7b723180c Mon Sep 17 00:00:00 2001
From: Georg Koppen <gk@torproject.org>
Date: Tue, 21 Apr 2020 11:03:13 +0000
Subject: [PATCH] Bug 33927: Use local maven repository for gradle dependencies

---
 build.gradle             | 2 ++
 buildSrc/build.gradle    | 1 +
 buildSrc/settings.gradle | 5 +++++
 settings.gradle          | 6 ++++++
 4 files changed, 14 insertions(+)
 create mode 100644 buildSrc/settings.gradle

diff --git a/build.gradle b/build.gradle
index 093a4fcd2..9b51c77d3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,6 +5,7 @@ import org.mozilla.fenix.gradle.tasks.GithubDetailsTask
 buildscript {
     // This logic is duplicated in the allprojects block: I don't know how to fix that.
     repositories {
+        mavenLocal()
         maven {
             name "Mozilla Nightly"
             url "https://nightly.maven.mozilla.org/maven2"
@@ -80,6 +81,7 @@ plugins {
 allprojects {
     // This logic is duplicated in the buildscript block: I don't know how to fix that.
     repositories {
+        mavenLocal()
         maven {
             name "Mozilla Nightly"
             url "https://nightly.maven.mozilla.org/maven2"
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index c3d133e6a..2eb6e05c3 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -7,6 +7,7 @@ plugins {
 }
 
 repositories {
+    mavenLocal()
     if (project.hasProperty("centralRepo")) {
         maven {
             name "MavenCentral"
diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle
new file mode 100644
index 000000000..a7066edcb
--- /dev/null
+++ b/buildSrc/settings.gradle
@@ -0,0 +1,5 @@
+pluginManagement {
+  repositories {
+    mavenLocal()
+  }
+}
diff --git a/settings.gradle b/settings.gradle
index 8440fc306..d2e8ba475 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,9 @@
+pluginManagement {
+  repositories {
+    mavenLocal()
+  }
+}
+
 include ':app'
 
 include ':mozilla-detekt-rules'
