From f899ee1d2fdfd46dfdba2b078ddf4c35e57c7108 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Thu, 10 Jun 2021 17:53:27 +0200 Subject: [PATCH] make httpclient compileOnly since it ships with the OS Signed-off-by: Andy Scherzinger --- app/build.gradle | 7 +++++++ .../com/nextcloud/talk/controllers/GeocodingController.kt | 1 - build.gradle | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ef8929b6a..a949db21b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -97,6 +97,8 @@ android { ] } } + + useLibrary 'org.apache.http.legacy' } dexOptions { @@ -113,6 +115,7 @@ android { packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/LICENSE' + exclude 'META-INF/NOTICE.txt' exclude 'META-INF/NOTICE' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/rxjava.properties' @@ -293,6 +296,10 @@ dependencies { implementation 'org.osmdroid:osmdroid-android:6.1.10' implementation 'fr.dudie:nominatim-api:3.4' + //noinspection DuplicatePlatformClasses + api 'org.apache.httpcomponents:httpclient:4.5.9' // Android comes with its own httpclient + // nominatim-api uses httpclient + testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-core:3.11.0' testImplementation "org.powermock:powermock-core:${powermockVersion}" diff --git a/app/src/main/java/com/nextcloud/talk/controllers/GeocodingController.kt b/app/src/main/java/com/nextcloud/talk/controllers/GeocodingController.kt index ca12f5c22..0c7a5f10e 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/GeocodingController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/GeocodingController.kt @@ -22,7 +22,6 @@ package com.nextcloud.talk.controllers import android.app.SearchManager import android.content.Context -import android.graphics.drawable.ColorDrawable import android.os.Build import android.os.Bundle import android.text.InputType diff --git a/build.gradle b/build.gradle index d3e6fd0aa..2e34c8246 100644 --- a/build.gradle +++ b/build.gradle @@ -49,8 +49,6 @@ buildscript { configurations.all { // check for updates every build resolutionStrategy.cacheChangingModulesFor 3600, 'seconds' - exclude module: 'httpclient' - exclude module: 'commons-logging' } allprojects {