From 3a2c10f077db17452f3583c6f9b6a9c3817f94e9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 19 Apr 2018 12:15:37 +0200 Subject: [PATCH] update to latest Gradle Android Plugin (3.1.1) and gradle (4.4.1) #1379 --- app/build.gradle | 21 +++------------------ build.gradle | 19 ++++++++++++++++--- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index db7694526..1ea563512 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,13 +13,6 @@ def getVersionName = { -> return stdout.toString().trim() } -repositories { - jcenter() - maven { - url "https://jitpack.io" - } -} - dependencies { compile "com.android.support:support-v4:25.3.1" compile "com.android.support:appcompat-v7:25.3.1" @@ -67,14 +60,6 @@ dependencies { if (!hasProperty('sourceDeps')) { - repositories { - // This is here until we sort out all dependencies from mavenCentral/jcenter. Once all of - // the dependencies below have been sorted out, this can be removed. - flatDir { - dirs 'libs/binaryDeps' - } - } - dependencies { compile 'com.madgag.spongycastle:pkix:1.54.0.0' compile 'com.madgag.spongycastle:prov:1.54.0.0' @@ -82,16 +67,16 @@ if (!hasProperty('sourceDeps')) { // Upstream doesn't have a binary on mavenCentral/jcenter yet: // https://github.com/kolavar/android-support-v4-preferencefragment/issues/13 - compile(name: 'support-v4-preferencefragment-release', ext: 'aar') + compile files('libs/binaryDeps/support-v4-preferencefragment-release.aar') // Fork for F-Droid, including support for https. Not merged into upstream // yet (seems to be a little unsupported as of late), so not using mavenCentral/jcenter. - compile(name: 'nanohttpd-2.1.0') + compile files('libs/binaryDeps/nanohttpd-2.1.0.jar') // Upstream doesn't have a binary on mavenCentral, and it is an SVN repo on // Google Code. We include this code directly in this repo, and have made // modifications that should be pushed to anyone who wants to maintain it. - compile(name: 'zipsigner') + compile files('libs/binaryDeps/zipsigner.jar') } // Only do the libraries imported from maven repositories. Our own libraries diff --git a/build.gradle b/build.gradle index 0c5d82fb1..506301943 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,23 @@ buildscript { repositories { - jcenter() + maven { + url "https://repo1.maven.org/maven2" + jcenter() + } + maven { + url 'https://maven.google.com/' + name 'Google' + } } dependencies { - // 2.2.2 is the version that is included in Debian/stretch - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:3.1.1' classpath files('libs/gradle-witness.jar') } } +allprojects { + repositories { + jcenter() + maven { url 'https://jitpack.io' } // for com.github.pserwylo:BottomNavigation:1.5.0. + maven { url 'https://maven.google.com' } + } +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 73aaa14be..077945983 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip -distributionSha256Sum=9843a3654d3e57dce54db06d05f18b664b95c22bf90c6becccb61fc63ce60689 +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip +distributionSha256Sum=e7cf7d1853dfc30c1c44f571d3919eeeedef002823b66b6a988d27e919686389