From ebfee5868e6f8ade9e1520a68d550ab0898d96b1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 6 Oct 2020 13:06:24 +0200 Subject: [PATCH] Remove OkReplay, not compatible to build tools `4.0.1` (and not used) --- build.gradle | 1 - matrix-sdk-android/build.gradle | 5 --- .../sdk/OkReplayRuleChainNoActivity.kt | 32 ------------------- .../android/sdk/internal/di/NetworkModule.kt | 11 +------ 4 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/OkReplayRuleChainNoActivity.kt diff --git a/build.gradle b/build.gradle index 59305598e5..ca502e4e7f 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.google.gms:google-services:4.3.2' - classpath "com.airbnb.okreplay:gradle-plugin:1.5.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2' diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index a8aea28754..495c204bfa 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' apply plugin: 'realm-android' -apply plugin: 'okreplay' buildscript { repositories { @@ -180,10 +179,6 @@ dependencies { // Use the same WebRTC library than the one used by Jitsi library implementation('com.facebook.react:react-native-webrtc:1.84.0-jitsi-5112273@aar') - debugImplementation 'com.airbnb.okreplay:okreplay:1.5.0' - releaseImplementation 'com.airbnb.okreplay:noop:1.5.0' - androidTestImplementation 'com.airbnb.okreplay:espresso:1.5.0' - testImplementation 'junit:junit:4.12' testImplementation 'org.robolectric:robolectric:4.3' //testImplementation 'org.robolectric:shadows-support-v4:3.0' diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/OkReplayRuleChainNoActivity.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/OkReplayRuleChainNoActivity.kt deleted file mode 100644 index 372ef95be8..0000000000 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/OkReplayRuleChainNoActivity.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2019 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.matrix.android.sdk - -import okreplay.OkReplayConfig -import okreplay.PermissionRule -import okreplay.RecorderRule -import org.junit.rules.RuleChain -import org.junit.rules.TestRule - -class OkReplayRuleChainNoActivity( - private val configuration: OkReplayConfig) { - - fun get(): TestRule { - return RuleChain.outerRule(PermissionRule(configuration)) - .around(RecorderRule(configuration)) - } -} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/NetworkModule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/NetworkModule.kt index 5fff658a56..1c11ef79f9 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/NetworkModule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/NetworkModule.kt @@ -29,7 +29,6 @@ import org.matrix.android.sdk.internal.network.interceptors.CurlLoggingIntercept import org.matrix.android.sdk.internal.network.interceptors.FormattedJsonHttpLogger import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor -import okreplay.OkReplayInterceptor import java.util.concurrent.TimeUnit @Module @@ -44,12 +43,6 @@ internal object NetworkModule { return interceptor } - @Provides - @JvmStatic - fun providesOkReplayInterceptor(): OkReplayInterceptor { - return OkReplayInterceptor() - } - @Provides @JvmStatic fun providesStethoInterceptor(): StethoInterceptor { @@ -71,8 +64,7 @@ internal object NetworkModule { timeoutInterceptor: TimeOutInterceptor, userAgentInterceptor: UserAgentInterceptor, httpLoggingInterceptor: HttpLoggingInterceptor, - curlLoggingInterceptor: CurlLoggingInterceptor, - okReplayInterceptor: OkReplayInterceptor): OkHttpClient { + curlLoggingInterceptor: CurlLoggingInterceptor): OkHttpClient { return OkHttpClient.Builder() .connectTimeout(30, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS) @@ -93,7 +85,6 @@ internal object NetworkModule { proxy(it) } } - .addInterceptor(okReplayInterceptor) .build() }