From 427e565d36d1cc6ce21e9ba3a78cc6a61ddd1402 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 10 Dec 2020 05:59:45 +0800 Subject: [PATCH] Update dependencies --- build.gradle.kts | 8 ++++---- detekt.yml | 27 ++++++++++++++++++++++++++- mobile/build.gradle.kts | 15 ++++++++------- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ae01c081..1b6a188b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.github.ben-manes.versions") version "0.34.0" + id("com.github.ben-manes.versions") version "0.36.0" } buildscript { @@ -9,9 +9,9 @@ buildscript { } dependencies { - classpath(kotlin("gradle-plugin", "1.4.10")) - classpath("com.android.tools.build:gradle:4.1.0") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.3.0") + classpath(kotlin("gradle-plugin", "1.4.21")) + classpath("com.android.tools.build:gradle:4.1.1") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.4.1") classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") classpath("com.google.gms:google-services:4.3.4") } diff --git a/detekt.yml b/detekt.yml index 86953877..b5534fe8 100644 --- a/detekt.yml +++ b/detekt.yml @@ -1,4 +1,4 @@ -# https://github.com/arturbosch/detekt/blob/v1.10.0/detekt-core/src/main/resources/default-detekt-config.yml +# https://github.com/detekt/detekt/blob/v1.14.2/detekt-core/src/main/resources/default-detekt-config.yml comments: active: false @@ -39,6 +39,8 @@ complexity: NestedBlockDepth: active: true threshold: 4 + ReplaceSafeCallChainWithRun: + active: true StringLiteralDuplication: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -64,6 +66,8 @@ coroutines: active: false RedundantSuspendModifier: active: true + SuspendFunWithFlowReturnType: + active: true empty-blocks: active: true @@ -130,6 +134,7 @@ exceptions: active: true ThrowingExceptionsWithoutMessageOrCause: active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] exceptions: - IllegalArgumentException - IllegalStateException @@ -152,6 +157,11 @@ formatting: autoCorrect: true AnnotationOnSeparateLine: active: false + AnnotationSpacing: + active: true + autoCorrect: true + ArgumentListWrapping: + active: false ChainWrapping: active: true autoCorrect: true @@ -302,6 +312,9 @@ naming: mustBeFirst: true MemberNameEqualsClassName: active: false + NonBooleanPropertyPrefixedWithIs: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] ObjectPropertyNaming: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -378,6 +391,8 @@ potential-bugs: active: true MissingWhenCase: active: false + NullableToStringCall: + active: true RedundantElseInWhen: active: true UnconditionalJumpStatementInLoop: @@ -399,6 +414,8 @@ potential-bugs: style: active: true + ClassOrdering: + active: false CollapsibleIfStatements: active: true DataClassContainsFunctions: @@ -441,6 +458,8 @@ style: excludeAnnotatedFunction: ['dagger.Provides'] LibraryCodeMustSpecifyReturnType: active: true + LibraryEntitiesShouldNotBePublic: + active: true LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 @@ -518,14 +537,20 @@ style: allowedNames: '(_|ignored|expected|serialVersionUID)' UseArrayLiteralsInAnnotations: active: true + UseCheckNotNull: + active: true UseCheckOrError: active: true UseDataClass: active: false + UseEmptyCounterpart: + active: true UseIfInsteadOfWhen: active: false UseRequire: active: true + UseRequireNotNull: + active: true UselessCallOnNotNull: active: true UtilityClassWithPublicConstructor: diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 65d41720..8aa0a84f 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -11,7 +11,7 @@ plugins { android { val javaVersion = JavaVersion.VERSION_1_8 val targetSdk = 29 - buildToolsVersion("30.0.2") + buildToolsVersion("30.0.3") compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = javaVersion @@ -70,30 +70,31 @@ dependencies { val lifecycleVersion = "2.3.0-beta01" val roomVersion = "2.2.5" - coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.0") + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.1") kapt("androidx.room:room-compiler:$roomVersion") + implementation(kotlin("stdlib-jdk8")) implementation("androidx.appcompat:appcompat:1.3.0-alpha02") // https://issuetracker.google.com/issues/151603528 - implementation("androidx.browser:browser:1.2.0") + implementation("androidx.browser:browser:1.3.0") implementation("androidx.core:core-ktx:1.3.2") implementation("androidx.emoji:emoji:1.1.0") - implementation("androidx.fragment:fragment-ktx:1.3.0-beta01") + implementation("androidx.fragment:fragment-ktx:1.3.0-beta02") implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") implementation("androidx.preference:preference:1.1.1") implementation("androidx.room:room-ktx:$roomVersion") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") - implementation("com.android.billingclient:billing-ktx:3.0.1") + implementation("com.android.billingclient:billing-ktx:3.0.2") implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") implementation("com.google.android.material:material:1.2.1") implementation("com.google.firebase:firebase-analytics-ktx:18.0.0") - implementation("com.google.firebase:firebase-crashlytics:17.2.2") + implementation("com.google.firebase:firebase-crashlytics:17.3.0") implementation("com.google.zxing:core:3.4.1") implementation("com.jakewharton.timber:timber:4.7.1") implementation("com.linkedin.dexmaker:dexmaker:2.28.0") implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.0") implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.3") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2") testImplementation("junit:junit:4.13.1") androidTestImplementation("androidx.room:room-testing:$roomVersion") androidTestImplementation("androidx.test:runner:1.3.0")