From 1045c47b2bf7e26f5c868638687ab97598a61173 Mon Sep 17 00:00:00 2001 From: Ahmed Rageh Date: Fri, 29 Jan 2021 20:35:59 +0200 Subject: [PATCH] -update gradle files with new versions -remove buildToolVersion to use latest by default -add throwable to CancellationException for passing exception to next layer to be handled easily --- adapter-flow/build.gradle | 1 - .../main/java/com/chenxyu/retrofit/adapter/FlowCallAdapter.kt | 2 +- app/build.gradle | 1 - build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/adapter-flow/build.gradle b/adapter-flow/build.gradle index 04e5919..27f7cff 100644 --- a/adapter-flow/build.gradle +++ b/adapter-flow/build.gradle @@ -6,7 +6,6 @@ apply plugin: 'com.github.dcendents.android-maven' group = 'com.github.chenxyu' android { compileSdkVersion 30 - buildToolsVersion "30.0.2" defaultConfig { minSdkVersion 21 diff --git a/adapter-flow/src/main/java/com/chenxyu/retrofit/adapter/FlowCallAdapter.kt b/adapter-flow/src/main/java/com/chenxyu/retrofit/adapter/FlowCallAdapter.kt index 9888d0a..e56c91f 100644 --- a/adapter-flow/src/main/java/com/chenxyu/retrofit/adapter/FlowCallAdapter.kt +++ b/adapter-flow/src/main/java/com/chenxyu/retrofit/adapter/FlowCallAdapter.kt @@ -43,7 +43,7 @@ internal class FlowCallAdapter(private val responseType: Type) : } override fun onFailure(call: Call, throwable: Throwable) { - cancel(CancellationException(throwable.message)) + cancel(CancellationException(throwable.localizedMessage, throwable)) } }) } diff --git a/app/build.gradle b/app/build.gradle index a1503b2..d9f9f94 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,6 @@ apply plugin: 'kotlin-kapt' android { compileSdkVersion 30 - buildToolsVersion "30.0.2" defaultConfig { applicationId "com.chenxyu.example" diff --git a/build.gradle b/build.gradle index bf34172..3784a48 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.20' + ext.kotlin_version = '1.4.21' ext.kotlinx_coroutines_version = '1.4.2' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.2' + classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac45837..d723867 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Sep 16 23:36:39 CST 2020 +#Fri Jan 29 20:31:51 EET 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip